using System;
using Oracle.ManagedDataAccess.Client;
using OracleInternal.Common;

namespace OracleInternal.Core
{
	internal class OracleNumberCore
	{
		private const int LNXSGNBT = 128;

		private const int LNXEXPMN = 0;

		private const int LNXEXPMX = 127;

		private static int LNXBASE = 100;

		private const byte LNXEXPBS = 64;

		private const byte LNXDIGS = 20;

		private const int LNXQTRIPREC = 15;

		private const int LNXQTRIMAXITER = 15;

		private static byte[] lnxqone = new byte[2]
		{
			193,
			2
		};

		private static byte[] lnxqtwo = new byte[2]
		{
			193,
			3
		};

		private const int LNXQACOS = 0;

		private const int LNXQASIN = 1;

		private const int LNXQATAN = 2;

		private const int LNXQCOS = 3;

		private const int LNXQSIN = 4;

		private const int LNXQTAN = 5;

		private const int LNXQCSH = 6;

		private const int LNXQSNH = 7;

		private const int LNXQTNH = 8;

		private const int LNXQEXP = 9;

		private const double ORANUM_FBASE = 100.0;

		internal static byte[] PI = new byte[21]
		{
			193,
			4,
			15,
			16,
			93,
			66,
			36,
			90,
			80,
			33,
			39,
			47,
			27,
			44,
			39,
			33,
			80,
			51,
			29,
			85,
			21
		};

		internal static byte[] E = new byte[21]
		{
			193,
			3,
			72,
			83,
			82,
			83,
			85,
			60,
			5,
			53,
			36,
			37,
			3,
			88,
			48,
			14,
			53,
			67,
			25,
			98,
			77
		};

		internal static byte[] LN10 = new byte[21]
		{
			193,
			3,
			31,
			26,
			86,
			10,
			30,
			95,
			5,
			57,
			85,
			2,
			80,
			92,
			46,
			47,
			85,
			37,
			43,
			8,
			61
		};

		internal static byte[] NANREPD = new byte[8]
		{
			255,
			248,
			0,
			0,
			0,
			0,
			0,
			0
		};

		private const int LNXM_NUM = 22;

		private const int LNXBYTEMASK = 255;

		private const int LNXSHORTMASK = 65535;

		private static int LNXDIV_LNXBASE_SQUARED = LNXBASE * LNXBASE;

		private const int MINUB1MAXVAL = 255;

		private static byte[] MAX_LONG = lnxmin(long.MaxValue);

		private static byte[] MIN_LONG = lnxmin(long.MinValue);

		private static byte[][] LnxqAdd_PPP = new byte[202][]
		{
			new byte[2],
			new byte[2]
			{
				0,
				1
			},
			new byte[2]
			{
				1,
				0
			},
			new byte[2]
			{
				2,
				0
			},
			new byte[2]
			{
				3,
				0
			},
			new byte[2]
			{
				4,
				0
			},
			new byte[2]
			{
				5,
				0
			},
			new byte[2]
			{
				6,
				0
			},
			new byte[2]
			{
				7,
				0
			},
			new byte[2]
			{
				8,
				0
			},
			new byte[2]
			{
				9,
				0
			},
			new byte[2]
			{
				10,
				0
			},
			new byte[2]
			{
				11,
				0
			},
			new byte[2]
			{
				12,
				0
			},
			new byte[2]
			{
				13,
				0
			},
			new byte[2]
			{
				14,
				0
			},
			new byte[2]
			{
				15,
				0
			},
			new byte[2]
			{
				16,
				0
			},
			new byte[2]
			{
				17,
				0
			},
			new byte[2]
			{
				18,
				0
			},
			new byte[2]
			{
				19,
				0
			},
			new byte[2]
			{
				20,
				0
			},
			new byte[2]
			{
				21,
				0
			},
			new byte[2]
			{
				22,
				0
			},
			new byte[2]
			{
				23,
				0
			},
			new byte[2]
			{
				24,
				0
			},
			new byte[2]
			{
				25,
				0
			},
			new byte[2]
			{
				26,
				0
			},
			new byte[2]
			{
				27,
				0
			},
			new byte[2]
			{
				28,
				0
			},
			new byte[2]
			{
				29,
				0
			},
			new byte[2]
			{
				30,
				0
			},
			new byte[2]
			{
				31,
				0
			},
			new byte[2]
			{
				32,
				0
			},
			new byte[2]
			{
				33,
				0
			},
			new byte[2]
			{
				34,
				0
			},
			new byte[2]
			{
				35,
				0
			},
			new byte[2]
			{
				36,
				0
			},
			new byte[2]
			{
				37,
				0
			},
			new byte[2]
			{
				38,
				0
			},
			new byte[2]
			{
				39,
				0
			},
			new byte[2]
			{
				40,
				0
			},
			new byte[2]
			{
				41,
				0
			},
			new byte[2]
			{
				42,
				0
			},
			new byte[2]
			{
				43,
				0
			},
			new byte[2]
			{
				44,
				0
			},
			new byte[2]
			{
				45,
				0
			},
			new byte[2]
			{
				46,
				0
			},
			new byte[2]
			{
				47,
				0
			},
			new byte[2]
			{
				48,
				0
			},
			new byte[2]
			{
				49,
				0
			},
			new byte[2]
			{
				50,
				0
			},
			new byte[2]
			{
				51,
				0
			},
			new byte[2]
			{
				52,
				0
			},
			new byte[2]
			{
				53,
				0
			},
			new byte[2]
			{
				54,
				0
			},
			new byte[2]
			{
				55,
				0
			},
			new byte[2]
			{
				56,
				0
			},
			new byte[2]
			{
				57,
				0
			},
			new byte[2]
			{
				58,
				0
			},
			new byte[2]
			{
				59,
				0
			},
			new byte[2]
			{
				60,
				0
			},
			new byte[2]
			{
				61,
				0
			},
			new byte[2]
			{
				62,
				0
			},
			new byte[2]
			{
				63,
				0
			},
			new byte[2]
			{
				64,
				0
			},
			new byte[2]
			{
				65,
				0
			},
			new byte[2]
			{
				66,
				0
			},
			new byte[2]
			{
				67,
				0
			},
			new byte[2]
			{
				68,
				0
			},
			new byte[2]
			{
				69,
				0
			},
			new byte[2]
			{
				70,
				0
			},
			new byte[2]
			{
				71,
				0
			},
			new byte[2]
			{
				72,
				0
			},
			new byte[2]
			{
				73,
				0
			},
			new byte[2]
			{
				74,
				0
			},
			new byte[2]
			{
				75,
				0
			},
			new byte[2]
			{
				76,
				0
			},
			new byte[2]
			{
				77,
				0
			},
			new byte[2]
			{
				78,
				0
			},
			new byte[2]
			{
				79,
				0
			},
			new byte[2]
			{
				80,
				0
			},
			new byte[2]
			{
				81,
				0
			},
			new byte[2]
			{
				82,
				0
			},
			new byte[2]
			{
				83,
				0
			},
			new byte[2]
			{
				84,
				0
			},
			new byte[2]
			{
				85,
				0
			},
			new byte[2]
			{
				86,
				0
			},
			new byte[2]
			{
				87,
				0
			},
			new byte[2]
			{
				88,
				0
			},
			new byte[2]
			{
				89,
				0
			},
			new byte[2]
			{
				90,
				0
			},
			new byte[2]
			{
				91,
				0
			},
			new byte[2]
			{
				92,
				0
			},
			new byte[2]
			{
				93,
				0
			},
			new byte[2]
			{
				94,
				0
			},
			new byte[2]
			{
				95,
				0
			},
			new byte[2]
			{
				96,
				0
			},
			new byte[2]
			{
				97,
				0
			},
			new byte[2]
			{
				98,
				0
			},
			new byte[2]
			{
				99,
				0
			},
			new byte[2]
			{
				100,
				0
			},
			new byte[2]
			{
				1,
				1
			},
			new byte[2]
			{
				2,
				1
			},
			new byte[2]
			{
				3,
				1
			},
			new byte[2]
			{
				4,
				1
			},
			new byte[2]
			{
				5,
				1
			},
			new byte[2]
			{
				6,
				1
			},
			new byte[2]
			{
				7,
				1
			},
			new byte[2]
			{
				8,
				1
			},
			new byte[2]
			{
				9,
				1
			},
			new byte[2]
			{
				10,
				1
			},
			new byte[2]
			{
				11,
				1
			},
			new byte[2]
			{
				12,
				1
			},
			new byte[2]
			{
				13,
				1
			},
			new byte[2]
			{
				14,
				1
			},
			new byte[2]
			{
				15,
				1
			},
			new byte[2]
			{
				16,
				1
			},
			new byte[2]
			{
				17,
				1
			},
			new byte[2]
			{
				18,
				1
			},
			new byte[2]
			{
				19,
				1
			},
			new byte[2]
			{
				20,
				1
			},
			new byte[2]
			{
				21,
				1
			},
			new byte[2]
			{
				22,
				1
			},
			new byte[2]
			{
				23,
				1
			},
			new byte[2]
			{
				24,
				1
			},
			new byte[2]
			{
				25,
				1
			},
			new byte[2]
			{
				26,
				1
			},
			new byte[2]
			{
				27,
				1
			},
			new byte[2]
			{
				28,
				1
			},
			new byte[2]
			{
				29,
				1
			},
			new byte[2]
			{
				30,
				1
			},
			new byte[2]
			{
				31,
				1
			},
			new byte[2]
			{
				32,
				1
			},
			new byte[2]
			{
				33,
				1
			},
			new byte[2]
			{
				34,
				1
			},
			new byte[2]
			{
				35,
				1
			},
			new byte[2]
			{
				36,
				1
			},
			new byte[2]
			{
				37,
				1
			},
			new byte[2]
			{
				38,
				1
			},
			new byte[2]
			{
				39,
				1
			},
			new byte[2]
			{
				40,
				1
			},
			new byte[2]
			{
				41,
				1
			},
			new byte[2]
			{
				42,
				1
			},
			new byte[2]
			{
				43,
				1
			},
			new byte[2]
			{
				44,
				1
			},
			new byte[2]
			{
				45,
				1
			},
			new byte[2]
			{
				46,
				1
			},
			new byte[2]
			{
				47,
				1
			},
			new byte[2]
			{
				48,
				1
			},
			new byte[2]
			{
				49,
				1
			},
			new byte[2]
			{
				50,
				1
			},
			new byte[2]
			{
				51,
				1
			},
			new byte[2]
			{
				52,
				1
			},
			new byte[2]
			{
				53,
				1
			},
			new byte[2]
			{
				54,
				1
			},
			new byte[2]
			{
				55,
				1
			},
			new byte[2]
			{
				56,
				1
			},
			new byte[2]
			{
				57,
				1
			},
			new byte[2]
			{
				58,
				1
			},
			new byte[2]
			{
				59,
				1
			},
			new byte[2]
			{
				60,
				1
			},
			new byte[2]
			{
				61,
				1
			},
			new byte[2]
			{
				62,
				1
			},
			new byte[2]
			{
				63,
				1
			},
			new byte[2]
			{
				64,
				1
			},
			new byte[2]
			{
				65,
				1
			},
			new byte[2]
			{
				66,
				1
			},
			new byte[2]
			{
				67,
				1
			},
			new byte[2]
			{
				68,
				1
			},
			new byte[2]
			{
				69,
				1
			},
			new byte[2]
			{
				70,
				1
			},
			new byte[2]
			{
				71,
				1
			},
			new byte[2]
			{
				72,
				1
			},
			new byte[2]
			{
				73,
				1
			},
			new byte[2]
			{
				74,
				1
			},
			new byte[2]
			{
				75,
				1
			},
			new byte[2]
			{
				76,
				1
			},
			new byte[2]
			{
				77,
				1
			},
			new byte[2]
			{
				78,
				1
			},
			new byte[2]
			{
				79,
				1
			},
			new byte[2]
			{
				80,
				1
			},
			new byte[2]
			{
				81,
				1
			},
			new byte[2]
			{
				82,
				1
			},
			new byte[2]
			{
				83,
				1
			},
			new byte[2]
			{
				84,
				1
			},
			new byte[2]
			{
				85,
				1
			},
			new byte[2]
			{
				86,
				1
			},
			new byte[2]
			{
				87,
				1
			},
			new byte[2]
			{
				88,
				1
			},
			new byte[2]
			{
				89,
				1
			},
			new byte[2]
			{
				90,
				1
			},
			new byte[2]
			{
				91,
				1
			},
			new byte[2]
			{
				92,
				1
			},
			new byte[2]
			{
				93,
				1
			},
			new byte[2]
			{
				94,
				1
			},
			new byte[2]
			{
				95,
				1
			},
			new byte[2]
			{
				96,
				1
			},
			new byte[2]
			{
				97,
				1
			},
			new byte[2]
			{
				98,
				1
			},
			new byte[2]
			{
				99,
				1
			},
			new byte[2]
			{
				100,
				1
			}
		};

		private static byte[][] LnxqAdd_NNN = new byte[205][]
		{
			new byte[2]
			{
				0,
				2
			},
			new byte[2]
			{
				0,
				1
			},
			new byte[2],
			new byte[2],
			new byte[2],
			new byte[2]
			{
				2,
				1
			},
			new byte[2]
			{
				3,
				1
			},
			new byte[2]
			{
				4,
				1
			},
			new byte[2]
			{
				5,
				1
			},
			new byte[2]
			{
				6,
				1
			},
			new byte[2]
			{
				7,
				1
			},
			new byte[2]
			{
				8,
				1
			},
			new byte[2]
			{
				9,
				1
			},
			new byte[2]
			{
				10,
				1
			},
			new byte[2]
			{
				11,
				1
			},
			new byte[2]
			{
				12,
				1
			},
			new byte[2]
			{
				13,
				1
			},
			new byte[2]
			{
				14,
				1
			},
			new byte[2]
			{
				15,
				1
			},
			new byte[2]
			{
				16,
				1
			},
			new byte[2]
			{
				17,
				1
			},
			new byte[2]
			{
				18,
				1
			},
			new byte[2]
			{
				19,
				1
			},
			new byte[2]
			{
				20,
				1
			},
			new byte[2]
			{
				21,
				1
			},
			new byte[2]
			{
				22,
				1
			},
			new byte[2]
			{
				23,
				1
			},
			new byte[2]
			{
				24,
				1
			},
			new byte[2]
			{
				25,
				1
			},
			new byte[2]
			{
				26,
				1
			},
			new byte[2]
			{
				27,
				1
			},
			new byte[2]
			{
				28,
				1
			},
			new byte[2]
			{
				29,
				1
			},
			new byte[2]
			{
				30,
				1
			},
			new byte[2]
			{
				31,
				1
			},
			new byte[2]
			{
				32,
				1
			},
			new byte[2]
			{
				33,
				1
			},
			new byte[2]
			{
				34,
				1
			},
			new byte[2]
			{
				35,
				1
			},
			new byte[2]
			{
				36,
				1
			},
			new byte[2]
			{
				37,
				1
			},
			new byte[2]
			{
				38,
				1
			},
			new byte[2]
			{
				39,
				1
			},
			new byte[2]
			{
				40,
				1
			},
			new byte[2]
			{
				41,
				1
			},
			new byte[2]
			{
				42,
				1
			},
			new byte[2]
			{
				43,
				1
			},
			new byte[2]
			{
				44,
				1
			},
			new byte[2]
			{
				45,
				1
			},
			new byte[2]
			{
				46,
				1
			},
			new byte[2]
			{
				47,
				1
			},
			new byte[2]
			{
				48,
				1
			},
			new byte[2]
			{
				49,
				1
			},
			new byte[2]
			{
				50,
				1
			},
			new byte[2]
			{
				51,
				1
			},
			new byte[2]
			{
				52,
				1
			},
			new byte[2]
			{
				53,
				1
			},
			new byte[2]
			{
				54,
				1
			},
			new byte[2]
			{
				55,
				1
			},
			new byte[2]
			{
				56,
				1
			},
			new byte[2]
			{
				57,
				1
			},
			new byte[2]
			{
				58,
				1
			},
			new byte[2]
			{
				59,
				1
			},
			new byte[2]
			{
				60,
				1
			},
			new byte[2]
			{
				61,
				1
			},
			new byte[2]
			{
				62,
				1
			},
			new byte[2]
			{
				63,
				1
			},
			new byte[2]
			{
				64,
				1
			},
			new byte[2]
			{
				65,
				1
			},
			new byte[2]
			{
				66,
				1
			},
			new byte[2]
			{
				67,
				1
			},
			new byte[2]
			{
				68,
				1
			},
			new byte[2]
			{
				69,
				1
			},
			new byte[2]
			{
				70,
				1
			},
			new byte[2]
			{
				71,
				1
			},
			new byte[2]
			{
				72,
				1
			},
			new byte[2]
			{
				73,
				1
			},
			new byte[2]
			{
				74,
				1
			},
			new byte[2]
			{
				75,
				1
			},
			new byte[2]
			{
				76,
				1
			},
			new byte[2]
			{
				77,
				1
			},
			new byte[2]
			{
				78,
				1
			},
			new byte[2]
			{
				79,
				1
			},
			new byte[2]
			{
				80,
				1
			},
			new byte[2]
			{
				81,
				1
			},
			new byte[2]
			{
				82,
				1
			},
			new byte[2]
			{
				83,
				1
			},
			new byte[2]
			{
				84,
				1
			},
			new byte[2]
			{
				85,
				1
			},
			new byte[2]
			{
				86,
				1
			},
			new byte[2]
			{
				87,
				1
			},
			new byte[2]
			{
				88,
				1
			},
			new byte[2]
			{
				89,
				1
			},
			new byte[2]
			{
				90,
				1
			},
			new byte[2]
			{
				91,
				1
			},
			new byte[2]
			{
				92,
				1
			},
			new byte[2]
			{
				93,
				1
			},
			new byte[2]
			{
				94,
				1
			},
			new byte[2]
			{
				95,
				1
			},
			new byte[2]
			{
				96,
				1
			},
			new byte[2]
			{
				97,
				1
			},
			new byte[2]
			{
				98,
				1
			},
			new byte[2]
			{
				99,
				1
			},
			new byte[2]
			{
				100,
				1
			},
			new byte[2]
			{
				101,
				1
			},
			new byte[2]
			{
				2,
				2
			},
			new byte[2]
			{
				3,
				2
			},
			new byte[2]
			{
				4,
				2
			},
			new byte[2]
			{
				5,
				2
			},
			new byte[2]
			{
				6,
				2
			},
			new byte[2]
			{
				7,
				2
			},
			new byte[2]
			{
				8,
				2
			},
			new byte[2]
			{
				9,
				2
			},
			new byte[2]
			{
				10,
				2
			},
			new byte[2]
			{
				11,
				2
			},
			new byte[2]
			{
				12,
				2
			},
			new byte[2]
			{
				13,
				2
			},
			new byte[2]
			{
				14,
				2
			},
			new byte[2]
			{
				15,
				2
			},
			new byte[2]
			{
				16,
				2
			},
			new byte[2]
			{
				17,
				2
			},
			new byte[2]
			{
				18,
				2
			},
			new byte[2]
			{
				19,
				2
			},
			new byte[2]
			{
				20,
				2
			},
			new byte[2]
			{
				21,
				2
			},
			new byte[2]
			{
				22,
				2
			},
			new byte[2]
			{
				23,
				2
			},
			new byte[2]
			{
				24,
				2
			},
			new byte[2]
			{
				25,
				2
			},
			new byte[2]
			{
				26,
				2
			},
			new byte[2]
			{
				27,
				2
			},
			new byte[2]
			{
				28,
				2
			},
			new byte[2]
			{
				29,
				2
			},
			new byte[2]
			{
				30,
				2
			},
			new byte[2]
			{
				31,
				2
			},
			new byte[2]
			{
				32,
				2
			},
			new byte[2]
			{
				33,
				2
			},
			new byte[2]
			{
				34,
				2
			},
			new byte[2]
			{
				35,
				2
			},
			new byte[2]
			{
				36,
				2
			},
			new byte[2]
			{
				37,
				2
			},
			new byte[2]
			{
				38,
				2
			},
			new byte[2]
			{
				39,
				2
			},
			new byte[2]
			{
				40,
				2
			},
			new byte[2]
			{
				41,
				2
			},
			new byte[2]
			{
				42,
				2
			},
			new byte[2]
			{
				43,
				2
			},
			new byte[2]
			{
				44,
				2
			},
			new byte[2]
			{
				45,
				2
			},
			new byte[2]
			{
				46,
				2
			},
			new byte[2]
			{
				47,
				2
			},
			new byte[2]
			{
				48,
				2
			},
			new byte[2]
			{
				49,
				2
			},
			new byte[2]
			{
				50,
				2
			},
			new byte[2]
			{
				51,
				2
			},
			new byte[2]
			{
				52,
				2
			},
			new byte[2]
			{
				53,
				2
			},
			new byte[2]
			{
				54,
				2
			},
			new byte[2]
			{
				55,
				2
			},
			new byte[2]
			{
				56,
				2
			},
			new byte[2]
			{
				57,
				2
			},
			new byte[2]
			{
				58,
				2
			},
			new byte[2]
			{
				59,
				2
			},
			new byte[2]
			{
				60,
				2
			},
			new byte[2]
			{
				61,
				2
			},
			new byte[2]
			{
				62,
				2
			},
			new byte[2]
			{
				63,
				2
			},
			new byte[2]
			{
				64,
				2
			},
			new byte[2]
			{
				65,
				2
			},
			new byte[2]
			{
				66,
				2
			},
			new byte[2]
			{
				67,
				2
			},
			new byte[2]
			{
				68,
				2
			},
			new byte[2]
			{
				69,
				2
			},
			new byte[2]
			{
				70,
				2
			},
			new byte[2]
			{
				71,
				2
			},
			new byte[2]
			{
				72,
				2
			},
			new byte[2]
			{
				73,
				2
			},
			new byte[2]
			{
				74,
				2
			},
			new byte[2]
			{
				75,
				2
			},
			new byte[2]
			{
				76,
				2
			},
			new byte[2]
			{
				77,
				2
			},
			new byte[2]
			{
				78,
				2
			},
			new byte[2]
			{
				79,
				2
			},
			new byte[2]
			{
				80,
				2
			},
			new byte[2]
			{
				81,
				2
			},
			new byte[2]
			{
				82,
				2
			},
			new byte[2]
			{
				83,
				2
			},
			new byte[2]
			{
				84,
				2
			},
			new byte[2]
			{
				85,
				2
			},
			new byte[2]
			{
				86,
				2
			},
			new byte[2]
			{
				87,
				2
			},
			new byte[2]
			{
				88,
				2
			},
			new byte[2]
			{
				89,
				2
			},
			new byte[2]
			{
				90,
				2
			},
			new byte[2]
			{
				91,
				2
			},
			new byte[2]
			{
				92,
				2
			},
			new byte[2]
			{
				93,
				2
			},
			new byte[2]
			{
				94,
				2
			},
			new byte[2]
			{
				95,
				2
			},
			new byte[2]
			{
				96,
				2
			},
			new byte[2]
			{
				97,
				2
			},
			new byte[2]
			{
				98,
				2
			},
			new byte[2]
			{
				99,
				2
			},
			new byte[2]
			{
				100,
				2
			},
			new byte[2]
			{
				101,
				2
			}
		};

		private static byte[][] LnxqAdd_PNP = new byte[204][]
		{
			new byte[2]
			{
				0,
				2
			},
			new byte[2]
			{
				0,
				1
			},
			new byte[2],
			new byte[2],
			new byte[2]
			{
				1,
				1
			},
			new byte[2]
			{
				2,
				1
			},
			new byte[2]
			{
				3,
				1
			},
			new byte[2]
			{
				4,
				1
			},
			new byte[2]
			{
				5,
				1
			},
			new byte[2]
			{
				6,
				1
			},
			new byte[2]
			{
				7,
				1
			},
			new byte[2]
			{
				8,
				1
			},
			new byte[2]
			{
				9,
				1
			},
			new byte[2]
			{
				10,
				1
			},
			new byte[2]
			{
				11,
				1
			},
			new byte[2]
			{
				12,
				1
			},
			new byte[2]
			{
				13,
				1
			},
			new byte[2]
			{
				14,
				1
			},
			new byte[2]
			{
				15,
				1
			},
			new byte[2]
			{
				16,
				1
			},
			new byte[2]
			{
				17,
				1
			},
			new byte[2]
			{
				18,
				1
			},
			new byte[2]
			{
				19,
				1
			},
			new byte[2]
			{
				20,
				1
			},
			new byte[2]
			{
				21,
				1
			},
			new byte[2]
			{
				22,
				1
			},
			new byte[2]
			{
				23,
				1
			},
			new byte[2]
			{
				24,
				1
			},
			new byte[2]
			{
				25,
				1
			},
			new byte[2]
			{
				26,
				1
			},
			new byte[2]
			{
				27,
				1
			},
			new byte[2]
			{
				28,
				1
			},
			new byte[2]
			{
				29,
				1
			},
			new byte[2]
			{
				30,
				1
			},
			new byte[2]
			{
				31,
				1
			},
			new byte[2]
			{
				32,
				1
			},
			new byte[2]
			{
				33,
				1
			},
			new byte[2]
			{
				34,
				1
			},
			new byte[2]
			{
				35,
				1
			},
			new byte[2]
			{
				36,
				1
			},
			new byte[2]
			{
				37,
				1
			},
			new byte[2]
			{
				38,
				1
			},
			new byte[2]
			{
				39,
				1
			},
			new byte[2]
			{
				40,
				1
			},
			new byte[2]
			{
				41,
				1
			},
			new byte[2]
			{
				42,
				1
			},
			new byte[2]
			{
				43,
				1
			},
			new byte[2]
			{
				44,
				1
			},
			new byte[2]
			{
				45,
				1
			},
			new byte[2]
			{
				46,
				1
			},
			new byte[2]
			{
				47,
				1
			},
			new byte[2]
			{
				48,
				1
			},
			new byte[2]
			{
				49,
				1
			},
			new byte[2]
			{
				50,
				1
			},
			new byte[2]
			{
				51,
				1
			},
			new byte[2]
			{
				52,
				1
			},
			new byte[2]
			{
				53,
				1
			},
			new byte[2]
			{
				54,
				1
			},
			new byte[2]
			{
				55,
				1
			},
			new byte[2]
			{
				56,
				1
			},
			new byte[2]
			{
				57,
				1
			},
			new byte[2]
			{
				58,
				1
			},
			new byte[2]
			{
				59,
				1
			},
			new byte[2]
			{
				60,
				1
			},
			new byte[2]
			{
				61,
				1
			},
			new byte[2]
			{
				62,
				1
			},
			new byte[2]
			{
				63,
				1
			},
			new byte[2]
			{
				64,
				1
			},
			new byte[2]
			{
				65,
				1
			},
			new byte[2]
			{
				66,
				1
			},
			new byte[2]
			{
				67,
				1
			},
			new byte[2]
			{
				68,
				1
			},
			new byte[2]
			{
				69,
				1
			},
			new byte[2]
			{
				70,
				1
			},
			new byte[2]
			{
				71,
				1
			},
			new byte[2]
			{
				72,
				1
			},
			new byte[2]
			{
				73,
				1
			},
			new byte[2]
			{
				74,
				1
			},
			new byte[2]
			{
				75,
				1
			},
			new byte[2]
			{
				76,
				1
			},
			new byte[2]
			{
				77,
				1
			},
			new byte[2]
			{
				78,
				1
			},
			new byte[2]
			{
				79,
				1
			},
			new byte[2]
			{
				80,
				1
			},
			new byte[2]
			{
				81,
				1
			},
			new byte[2]
			{
				82,
				1
			},
			new byte[2]
			{
				83,
				1
			},
			new byte[2]
			{
				84,
				1
			},
			new byte[2]
			{
				85,
				1
			},
			new byte[2]
			{
				86,
				1
			},
			new byte[2]
			{
				87,
				1
			},
			new byte[2]
			{
				88,
				1
			},
			new byte[2]
			{
				89,
				1
			},
			new byte[2]
			{
				90,
				1
			},
			new byte[2]
			{
				91,
				1
			},
			new byte[2]
			{
				92,
				1
			},
			new byte[2]
			{
				93,
				1
			},
			new byte[2]
			{
				94,
				1
			},
			new byte[2]
			{
				95,
				1
			},
			new byte[2]
			{
				96,
				1
			},
			new byte[2]
			{
				97,
				1
			},
			new byte[2]
			{
				98,
				1
			},
			new byte[2]
			{
				99,
				1
			},
			new byte[2]
			{
				100,
				1
			},
			new byte[2]
			{
				1,
				2
			},
			new byte[2]
			{
				2,
				2
			},
			new byte[2]
			{
				3,
				2
			},
			new byte[2]
			{
				4,
				2
			},
			new byte[2]
			{
				5,
				2
			},
			new byte[2]
			{
				6,
				2
			},
			new byte[2]
			{
				7,
				2
			},
			new byte[2]
			{
				8,
				2
			},
			new byte[2]
			{
				9,
				2
			},
			new byte[2]
			{
				10,
				2
			},
			new byte[2]
			{
				11,
				2
			},
			new byte[2]
			{
				12,
				2
			},
			new byte[2]
			{
				13,
				2
			},
			new byte[2]
			{
				14,
				2
			},
			new byte[2]
			{
				15,
				2
			},
			new byte[2]
			{
				16,
				2
			},
			new byte[2]
			{
				17,
				2
			},
			new byte[2]
			{
				18,
				2
			},
			new byte[2]
			{
				19,
				2
			},
			new byte[2]
			{
				20,
				2
			},
			new byte[2]
			{
				21,
				2
			},
			new byte[2]
			{
				22,
				2
			},
			new byte[2]
			{
				23,
				2
			},
			new byte[2]
			{
				24,
				2
			},
			new byte[2]
			{
				25,
				2
			},
			new byte[2]
			{
				26,
				2
			},
			new byte[2]
			{
				27,
				2
			},
			new byte[2]
			{
				28,
				2
			},
			new byte[2]
			{
				29,
				2
			},
			new byte[2]
			{
				30,
				2
			},
			new byte[2]
			{
				31,
				2
			},
			new byte[2]
			{
				32,
				2
			},
			new byte[2]
			{
				33,
				2
			},
			new byte[2]
			{
				34,
				2
			},
			new byte[2]
			{
				35,
				2
			},
			new byte[2]
			{
				36,
				2
			},
			new byte[2]
			{
				37,
				2
			},
			new byte[2]
			{
				38,
				2
			},
			new byte[2]
			{
				39,
				2
			},
			new byte[2]
			{
				40,
				2
			},
			new byte[2]
			{
				41,
				2
			},
			new byte[2]
			{
				42,
				2
			},
			new byte[2]
			{
				43,
				2
			},
			new byte[2]
			{
				44,
				2
			},
			new byte[2]
			{
				45,
				2
			},
			new byte[2]
			{
				46,
				2
			},
			new byte[2]
			{
				47,
				2
			},
			new byte[2]
			{
				48,
				2
			},
			new byte[2]
			{
				49,
				2
			},
			new byte[2]
			{
				50,
				2
			},
			new byte[2]
			{
				51,
				2
			},
			new byte[2]
			{
				52,
				2
			},
			new byte[2]
			{
				53,
				2
			},
			new byte[2]
			{
				54,
				2
			},
			new byte[2]
			{
				55,
				2
			},
			new byte[2]
			{
				56,
				2
			},
			new byte[2]
			{
				57,
				2
			},
			new byte[2]
			{
				58,
				2
			},
			new byte[2]
			{
				59,
				2
			},
			new byte[2]
			{
				60,
				2
			},
			new byte[2]
			{
				61,
				2
			},
			new byte[2]
			{
				62,
				2
			},
			new byte[2]
			{
				63,
				2
			},
			new byte[2]
			{
				64,
				2
			},
			new byte[2]
			{
				65,
				2
			},
			new byte[2]
			{
				66,
				2
			},
			new byte[2]
			{
				67,
				2
			},
			new byte[2]
			{
				68,
				2
			},
			new byte[2]
			{
				69,
				2
			},
			new byte[2]
			{
				70,
				2
			},
			new byte[2]
			{
				71,
				2
			},
			new byte[2]
			{
				72,
				2
			},
			new byte[2]
			{
				73,
				2
			},
			new byte[2]
			{
				74,
				2
			},
			new byte[2]
			{
				75,
				2
			},
			new byte[2]
			{
				76,
				2
			},
			new byte[2]
			{
				77,
				2
			},
			new byte[2]
			{
				78,
				2
			},
			new byte[2]
			{
				79,
				2
			},
			new byte[2]
			{
				80,
				2
			},
			new byte[2]
			{
				81,
				2
			},
			new byte[2]
			{
				82,
				2
			},
			new byte[2]
			{
				83,
				2
			},
			new byte[2]
			{
				84,
				2
			},
			new byte[2]
			{
				85,
				2
			},
			new byte[2]
			{
				86,
				2
			},
			new byte[2]
			{
				87,
				2
			},
			new byte[2]
			{
				88,
				2
			},
			new byte[2]
			{
				89,
				2
			},
			new byte[2]
			{
				90,
				2
			},
			new byte[2]
			{
				91,
				2
			},
			new byte[2]
			{
				92,
				2
			},
			new byte[2]
			{
				93,
				2
			},
			new byte[2]
			{
				94,
				2
			},
			new byte[2]
			{
				95,
				2
			},
			new byte[2]
			{
				96,
				2
			},
			new byte[2]
			{
				97,
				2
			},
			new byte[2]
			{
				98,
				2
			},
			new byte[2]
			{
				99,
				2
			},
			new byte[2]
			{
				100,
				2
			}
		};

		private static byte[][] LnxqAdd_PNN = new byte[203][]
		{
			new byte[2],
			new byte[2]
			{
				0,
				1
			},
			new byte[2],
			new byte[2]
			{
				2,
				0
			},
			new byte[2]
			{
				3,
				0
			},
			new byte[2]
			{
				4,
				0
			},
			new byte[2]
			{
				5,
				0
			},
			new byte[2]
			{
				6,
				0
			},
			new byte[2]
			{
				7,
				0
			},
			new byte[2]
			{
				8,
				0
			},
			new byte[2]
			{
				9,
				0
			},
			new byte[2]
			{
				10,
				0
			},
			new byte[2]
			{
				11,
				0
			},
			new byte[2]
			{
				12,
				0
			},
			new byte[2]
			{
				13,
				0
			},
			new byte[2]
			{
				14,
				0
			},
			new byte[2]
			{
				15,
				0
			},
			new byte[2]
			{
				16,
				0
			},
			new byte[2]
			{
				17,
				0
			},
			new byte[2]
			{
				18,
				0
			},
			new byte[2]
			{
				19,
				0
			},
			new byte[2]
			{
				20,
				0
			},
			new byte[2]
			{
				21,
				0
			},
			new byte[2]
			{
				22,
				0
			},
			new byte[2]
			{
				23,
				0
			},
			new byte[2]
			{
				24,
				0
			},
			new byte[2]
			{
				25,
				0
			},
			new byte[2]
			{
				26,
				0
			},
			new byte[2]
			{
				27,
				0
			},
			new byte[2]
			{
				28,
				0
			},
			new byte[2]
			{
				29,
				0
			},
			new byte[2]
			{
				30,
				0
			},
			new byte[2]
			{
				31,
				0
			},
			new byte[2]
			{
				32,
				0
			},
			new byte[2]
			{
				33,
				0
			},
			new byte[2]
			{
				34,
				0
			},
			new byte[2]
			{
				35,
				0
			},
			new byte[2]
			{
				36,
				0
			},
			new byte[2]
			{
				37,
				0
			},
			new byte[2]
			{
				38,
				0
			},
			new byte[2]
			{
				39,
				0
			},
			new byte[2]
			{
				40,
				0
			},
			new byte[2]
			{
				41,
				0
			},
			new byte[2]
			{
				42,
				0
			},
			new byte[2]
			{
				43,
				0
			},
			new byte[2]
			{
				44,
				0
			},
			new byte[2]
			{
				45,
				0
			},
			new byte[2]
			{
				46,
				0
			},
			new byte[2]
			{
				47,
				0
			},
			new byte[2]
			{
				48,
				0
			},
			new byte[2]
			{
				49,
				0
			},
			new byte[2]
			{
				50,
				0
			},
			new byte[2]
			{
				51,
				0
			},
			new byte[2]
			{
				52,
				0
			},
			new byte[2]
			{
				53,
				0
			},
			new byte[2]
			{
				54,
				0
			},
			new byte[2]
			{
				55,
				0
			},
			new byte[2]
			{
				56,
				0
			},
			new byte[2]
			{
				57,
				0
			},
			new byte[2]
			{
				58,
				0
			},
			new byte[2]
			{
				59,
				0
			},
			new byte[2]
			{
				60,
				0
			},
			new byte[2]
			{
				61,
				0
			},
			new byte[2]
			{
				62,
				0
			},
			new byte[2]
			{
				63,
				0
			},
			new byte[2]
			{
				64,
				0
			},
			new byte[2]
			{
				65,
				0
			},
			new byte[2]
			{
				66,
				0
			},
			new byte[2]
			{
				67,
				0
			},
			new byte[2]
			{
				68,
				0
			},
			new byte[2]
			{
				69,
				0
			},
			new byte[2]
			{
				70,
				0
			},
			new byte[2]
			{
				71,
				0
			},
			new byte[2]
			{
				72,
				0
			},
			new byte[2]
			{
				73,
				0
			},
			new byte[2]
			{
				74,
				0
			},
			new byte[2]
			{
				75,
				0
			},
			new byte[2]
			{
				76,
				0
			},
			new byte[2]
			{
				77,
				0
			},
			new byte[2]
			{
				78,
				0
			},
			new byte[2]
			{
				79,
				0
			},
			new byte[2]
			{
				80,
				0
			},
			new byte[2]
			{
				81,
				0
			},
			new byte[2]
			{
				82,
				0
			},
			new byte[2]
			{
				83,
				0
			},
			new byte[2]
			{
				84,
				0
			},
			new byte[2]
			{
				85,
				0
			},
			new byte[2]
			{
				86,
				0
			},
			new byte[2]
			{
				87,
				0
			},
			new byte[2]
			{
				88,
				0
			},
			new byte[2]
			{
				89,
				0
			},
			new byte[2]
			{
				90,
				0
			},
			new byte[2]
			{
				91,
				0
			},
			new byte[2]
			{
				92,
				0
			},
			new byte[2]
			{
				93,
				0
			},
			new byte[2]
			{
				94,
				0
			},
			new byte[2]
			{
				95,
				0
			},
			new byte[2]
			{
				96,
				0
			},
			new byte[2]
			{
				97,
				0
			},
			new byte[2]
			{
				98,
				0
			},
			new byte[2]
			{
				99,
				0
			},
			new byte[2]
			{
				100,
				0
			},
			new byte[2]
			{
				101,
				0
			},
			new byte[2]
			{
				2,
				1
			},
			new byte[2]
			{
				3,
				1
			},
			new byte[2]
			{
				4,
				1
			},
			new byte[2]
			{
				5,
				1
			},
			new byte[2]
			{
				6,
				1
			},
			new byte[2]
			{
				7,
				1
			},
			new byte[2]
			{
				8,
				1
			},
			new byte[2]
			{
				9,
				1
			},
			new byte[2]
			{
				10,
				1
			},
			new byte[2]
			{
				11,
				1
			},
			new byte[2]
			{
				12,
				1
			},
			new byte[2]
			{
				13,
				1
			},
			new byte[2]
			{
				14,
				1
			},
			new byte[2]
			{
				15,
				1
			},
			new byte[2]
			{
				16,
				1
			},
			new byte[2]
			{
				17,
				1
			},
			new byte[2]
			{
				18,
				1
			},
			new byte[2]
			{
				19,
				1
			},
			new byte[2]
			{
				20,
				1
			},
			new byte[2]
			{
				21,
				1
			},
			new byte[2]
			{
				22,
				1
			},
			new byte[2]
			{
				23,
				1
			},
			new byte[2]
			{
				24,
				1
			},
			new byte[2]
			{
				25,
				1
			},
			new byte[2]
			{
				26,
				1
			},
			new byte[2]
			{
				27,
				1
			},
			new byte[2]
			{
				28,
				1
			},
			new byte[2]
			{
				29,
				1
			},
			new byte[2]
			{
				30,
				1
			},
			new byte[2]
			{
				31,
				1
			},
			new byte[2]
			{
				32,
				1
			},
			new byte[2]
			{
				33,
				1
			},
			new byte[2]
			{
				34,
				1
			},
			new byte[2]
			{
				35,
				1
			},
			new byte[2]
			{
				36,
				1
			},
			new byte[2]
			{
				37,
				1
			},
			new byte[2]
			{
				38,
				1
			},
			new byte[2]
			{
				39,
				1
			},
			new byte[2]
			{
				40,
				1
			},
			new byte[2]
			{
				41,
				1
			},
			new byte[2]
			{
				42,
				1
			},
			new byte[2]
			{
				43,
				1
			},
			new byte[2]
			{
				44,
				1
			},
			new byte[2]
			{
				45,
				1
			},
			new byte[2]
			{
				46,
				1
			},
			new byte[2]
			{
				47,
				1
			},
			new byte[2]
			{
				48,
				1
			},
			new byte[2]
			{
				49,
				1
			},
			new byte[2]
			{
				50,
				1
			},
			new byte[2]
			{
				51,
				1
			},
			new byte[2]
			{
				52,
				1
			},
			new byte[2]
			{
				53,
				1
			},
			new byte[2]
			{
				54,
				1
			},
			new byte[2]
			{
				55,
				1
			},
			new byte[2]
			{
				56,
				1
			},
			new byte[2]
			{
				57,
				1
			},
			new byte[2]
			{
				58,
				1
			},
			new byte[2]
			{
				59,
				1
			},
			new byte[2]
			{
				60,
				1
			},
			new byte[2]
			{
				61,
				1
			},
			new byte[2]
			{
				62,
				1
			},
			new byte[2]
			{
				63,
				1
			},
			new byte[2]
			{
				64,
				1
			},
			new byte[2]
			{
				65,
				1
			},
			new byte[2]
			{
				66,
				1
			},
			new byte[2]
			{
				67,
				1
			},
			new byte[2]
			{
				68,
				1
			},
			new byte[2]
			{
				69,
				1
			},
			new byte[2]
			{
				70,
				1
			},
			new byte[2]
			{
				71,
				1
			},
			new byte[2]
			{
				72,
				1
			},
			new byte[2]
			{
				73,
				1
			},
			new byte[2]
			{
				74,
				1
			},
			new byte[2]
			{
				75,
				1
			},
			new byte[2]
			{
				76,
				1
			},
			new byte[2]
			{
				77,
				1
			},
			new byte[2]
			{
				78,
				1
			},
			new byte[2]
			{
				79,
				1
			},
			new byte[2]
			{
				80,
				1
			},
			new byte[2]
			{
				81,
				1
			},
			new byte[2]
			{
				82,
				1
			},
			new byte[2]
			{
				83,
				1
			},
			new byte[2]
			{
				84,
				1
			},
			new byte[2]
			{
				85,
				1
			},
			new byte[2]
			{
				86,
				1
			},
			new byte[2]
			{
				87,
				1
			},
			new byte[2]
			{
				88,
				1
			},
			new byte[2]
			{
				89,
				1
			},
			new byte[2]
			{
				90,
				1
			},
			new byte[2]
			{
				91,
				1
			},
			new byte[2]
			{
				92,
				1
			},
			new byte[2]
			{
				93,
				1
			},
			new byte[2]
			{
				94,
				1
			},
			new byte[2]
			{
				95,
				1
			},
			new byte[2]
			{
				96,
				1
			},
			new byte[2]
			{
				97,
				1
			},
			new byte[2]
			{
				98,
				1
			},
			new byte[2]
			{
				99,
				1
			},
			new byte[2]
			{
				100,
				1
			},
			new byte[2]
			{
				101,
				1
			}
		};

		private static double[][] powerTable = new double[8][]
		{
			new double[3]
			{
				128.0,
				1E+256,
				1E-256
			},
			new double[3]
			{
				64.0,
				1E+128,
				1E-128
			},
			new double[3]
			{
				32.0,
				1E+64,
				1E-64
			},
			new double[3]
			{
				16.0,
				1E+32,
				1E-32
			},
			new double[3]
			{
				8.0,
				1E+16,
				1E-16
			},
			new double[3]
			{
				4.0,
				100000000.0,
				1E-08
			},
			new double[3]
			{
				2.0,
				10000.0,
				0.0001
			},
			new double[3]
			{
				1.0,
				100.0,
				0.01
			}
		};

		private static byte[] LnxqNegate = new byte[102]
		{
			0,
			101,
			100,
			99,
			98,
			97,
			96,
			95,
			94,
			93,
			92,
			91,
			90,
			89,
			88,
			87,
			86,
			85,
			84,
			83,
			82,
			81,
			80,
			79,
			78,
			77,
			76,
			75,
			74,
			73,
			72,
			71,
			70,
			69,
			68,
			67,
			66,
			65,
			64,
			63,
			62,
			61,
			60,
			59,
			58,
			57,
			56,
			55,
			54,
			53,
			52,
			51,
			50,
			49,
			48,
			47,
			46,
			45,
			44,
			43,
			42,
			41,
			40,
			39,
			38,
			37,
			36,
			35,
			34,
			33,
			32,
			31,
			30,
			29,
			28,
			27,
			26,
			25,
			24,
			23,
			22,
			21,
			20,
			19,
			18,
			17,
			16,
			15,
			14,
			13,
			12,
			11,
			10,
			9,
			8,
			7,
			6,
			5,
			4,
			3,
			2,
			1
		};

		private static byte[] LnxqTruncate_P = new byte[101]
		{
			0,
			1,
			1,
			1,
			1,
			1,
			1,
			1,
			1,
			1,
			1,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			91
		};

		private static byte[] LnxqTruncate_N = new byte[102]
		{
			0,
			0,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			101,
			101,
			101,
			101,
			101,
			101,
			101,
			101,
			101,
			101
		};

		private static byte[] LnxqFirstDigit = new byte[102]
		{
			0,
			1,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			1,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			1,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			1,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			1,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			1,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			1,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			1,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			1,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			1,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			1
		};

		private static double[][] factorTable = new double[50][]
		{
			new double[3]
			{
				15.0,
				1E+30,
				1E-30
			},
			new double[3]
			{
				14.0,
				1E+28,
				1E-28
			},
			new double[3]
			{
				13.0,
				1E+26,
				1E-26
			},
			new double[3]
			{
				12.0,
				1E+24,
				1E-24
			},
			new double[3]
			{
				11.0,
				1E+22,
				1E-22
			},
			new double[3]
			{
				10.0,
				1E+20,
				1E-20
			},
			new double[3]
			{
				9.0,
				1E+18,
				1E-18
			},
			new double[3]
			{
				8.0,
				1E+16,
				1E-16
			},
			new double[3]
			{
				7.0,
				100000000000000.0,
				1E-14
			},
			new double[3]
			{
				6.0,
				1000000000000.0,
				1E-12
			},
			new double[3]
			{
				5.0,
				10000000000.0,
				1E-10
			},
			new double[3]
			{
				4.0,
				100000000.0,
				1E-08
			},
			new double[3]
			{
				3.0,
				1000000.0,
				1E-06
			},
			new double[3]
			{
				2.0,
				10000.0,
				0.0001
			},
			new double[3]
			{
				1.0,
				100.0,
				0.01
			},
			new double[3]
			{
				0.0,
				1.0,
				1.0
			},
			new double[3]
			{
				-1.0,
				0.01,
				100.0
			},
			new double[3]
			{
				-2.0,
				0.0001,
				10000.0
			},
			new double[3]
			{
				-3.0,
				1E-06,
				1000000.0
			},
			new double[3]
			{
				-4.0,
				1E-08,
				100000000.0
			},
			new double[3]
			{
				-5.0,
				1E-10,
				10000000000.0
			},
			new double[3]
			{
				-6.0,
				1E-12,
				1000000000000.0
			},
			new double[3]
			{
				-7.0,
				1E-14,
				100000000000000.0
			},
			new double[3]
			{
				-8.0,
				1E-16,
				1E+16
			},
			new double[3]
			{
				-9.0,
				1E-18,
				1E+18
			},
			new double[3]
			{
				-10.0,
				1E-20,
				1E+20
			},
			new double[3]
			{
				-11.0,
				1E-22,
				1E+22
			},
			new double[3]
			{
				-12.0,
				1E-24,
				1E+24
			},
			new double[3]
			{
				-13.0,
				1E-26,
				1E+26
			},
			new double[3]
			{
				-14.0,
				1E-28,
				1E+28
			},
			new double[3]
			{
				-15.0,
				1E-30,
				1E+30
			},
			new double[3]
			{
				-16.0,
				1E-32,
				1E+32
			},
			new double[3]
			{
				-17.0,
				1E-34,
				1E+34
			},
			new double[3]
			{
				-18.0,
				1E-36,
				1E+36
			},
			new double[3]
			{
				-19.0,
				1E-38,
				1E+38
			},
			new double[3]
			{
				-20.0,
				1E-40,
				1E+40
			},
			new double[3]
			{
				-21.0,
				1E-42,
				1E+42
			},
			new double[3]
			{
				-22.0,
				1E-44,
				1E+44
			},
			new double[3]
			{
				-23.0,
				1E-46,
				1E+46
			},
			new double[3]
			{
				-24.0,
				1E-48,
				1E+48
			},
			new double[3]
			{
				-25.0,
				1E-50,
				1E+50
			},
			new double[3]
			{
				-26.0,
				1E-52,
				1E+52
			},
			new double[3]
			{
				-27.0,
				1E-54,
				1E+54
			},
			new double[3]
			{
				-28.0,
				1E-56,
				1E+56
			},
			new double[3]
			{
				-29.0,
				1E-58,
				1E+58
			},
			new double[3]
			{
				-30.0,
				1E-60,
				1E+60
			},
			new double[3]
			{
				-31.0,
				1E-62,
				1E+62
			},
			new double[3]
			{
				-32.0,
				1E-64,
				1E+64
			},
			new double[3]
			{
				-33.0,
				1E-66,
				1E+66
			},
			new double[3]
			{
				-34.0,
				1E-68,
				1E+68
			}
		};

		private static byte[] LnxqRound_P = new byte[101]
		{
			0,
			1,
			1,
			1,
			1,
			1,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			101,
			101,
			101,
			101,
			101
		};

		private static byte[] LnxqRound_N = new byte[102]
		{
			0,
			0,
			1,
			1,
			1,
			1,
			1,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			11,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			21,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			31,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			41,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			51,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			61,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			71,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			81,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			91,
			101,
			101,
			101,
			101,
			101
		};

		private static byte[][] LnxqComponents_P = new byte[101][]
		{
			new byte[2],
			new byte[2],
			new byte[2]
			{
				0,
				1
			},
			new byte[2]
			{
				0,
				2
			},
			new byte[2]
			{
				0,
				3
			},
			new byte[2]
			{
				0,
				4
			},
			new byte[2]
			{
				0,
				5
			},
			new byte[2]
			{
				0,
				6
			},
			new byte[2]
			{
				0,
				7
			},
			new byte[2]
			{
				0,
				8
			},
			new byte[2]
			{
				0,
				9
			},
			new byte[2]
			{
				1,
				0
			},
			new byte[2]
			{
				1,
				1
			},
			new byte[2]
			{
				1,
				2
			},
			new byte[2]
			{
				1,
				3
			},
			new byte[2]
			{
				1,
				4
			},
			new byte[2]
			{
				1,
				5
			},
			new byte[2]
			{
				1,
				6
			},
			new byte[2]
			{
				1,
				7
			},
			new byte[2]
			{
				1,
				8
			},
			new byte[2]
			{
				1,
				9
			},
			new byte[2]
			{
				2,
				0
			},
			new byte[2]
			{
				2,
				1
			},
			new byte[2]
			{
				2,
				2
			},
			new byte[2]
			{
				2,
				3
			},
			new byte[2]
			{
				2,
				4
			},
			new byte[2]
			{
				2,
				5
			},
			new byte[2]
			{
				2,
				6
			},
			new byte[2]
			{
				2,
				7
			},
			new byte[2]
			{
				2,
				8
			},
			new byte[2]
			{
				2,
				9
			},
			new byte[2]
			{
				3,
				0
			},
			new byte[2]
			{
				3,
				1
			},
			new byte[2]
			{
				3,
				2
			},
			new byte[2]
			{
				3,
				3
			},
			new byte[2]
			{
				3,
				4
			},
			new byte[2]
			{
				3,
				5
			},
			new byte[2]
			{
				3,
				6
			},
			new byte[2]
			{
				3,
				7
			},
			new byte[2]
			{
				3,
				8
			},
			new byte[2]
			{
				3,
				9
			},
			new byte[2]
			{
				4,
				0
			},
			new byte[2]
			{
				4,
				1
			},
			new byte[2]
			{
				4,
				2
			},
			new byte[2]
			{
				4,
				3
			},
			new byte[2]
			{
				4,
				4
			},
			new byte[2]
			{
				4,
				5
			},
			new byte[2]
			{
				4,
				6
			},
			new byte[2]
			{
				4,
				7
			},
			new byte[2]
			{
				4,
				8
			},
			new byte[2]
			{
				4,
				9
			},
			new byte[2]
			{
				5,
				0
			},
			new byte[2]
			{
				5,
				1
			},
			new byte[2]
			{
				5,
				2
			},
			new byte[2]
			{
				5,
				3
			},
			new byte[2]
			{
				5,
				4
			},
			new byte[2]
			{
				5,
				5
			},
			new byte[2]
			{
				5,
				6
			},
			new byte[2]
			{
				5,
				7
			},
			new byte[2]
			{
				5,
				8
			},
			new byte[2]
			{
				5,
				9
			},
			new byte[2]
			{
				6,
				0
			},
			new byte[2]
			{
				6,
				1
			},
			new byte[2]
			{
				6,
				2
			},
			new byte[2]
			{
				6,
				3
			},
			new byte[2]
			{
				6,
				4
			},
			new byte[2]
			{
				6,
				5
			},
			new byte[2]
			{
				6,
				6
			},
			new byte[2]
			{
				6,
				7
			},
			new byte[2]
			{
				6,
				8
			},
			new byte[2]
			{
				6,
				9
			},
			new byte[2]
			{
				7,
				0
			},
			new byte[2]
			{
				7,
				1
			},
			new byte[2]
			{
				7,
				2
			},
			new byte[2]
			{
				7,
				3
			},
			new byte[2]
			{
				7,
				4
			},
			new byte[2]
			{
				7,
				5
			},
			new byte[2]
			{
				7,
				6
			},
			new byte[2]
			{
				7,
				7
			},
			new byte[2]
			{
				7,
				8
			},
			new byte[2]
			{
				7,
				9
			},
			new byte[2]
			{
				8,
				0
			},
			new byte[2]
			{
				8,
				1
			},
			new byte[2]
			{
				8,
				2
			},
			new byte[2]
			{
				8,
				3
			},
			new byte[2]
			{
				8,
				4
			},
			new byte[2]
			{
				8,
				5
			},
			new byte[2]
			{
				8,
				6
			},
			new byte[2]
			{
				8,
				7
			},
			new byte[2]
			{
				8,
				8
			},
			new byte[2]
			{
				8,
				9
			},
			new byte[2]
			{
				9,
				0
			},
			new byte[2]
			{
				9,
				1
			},
			new byte[2]
			{
				9,
				2
			},
			new byte[2]
			{
				9,
				3
			},
			new byte[2]
			{
				9,
				4
			},
			new byte[2]
			{
				9,
				5
			},
			new byte[2]
			{
				9,
				6
			},
			new byte[2]
			{
				9,
				7
			},
			new byte[2]
			{
				9,
				8
			},
			new byte[2]
			{
				9,
				9
			}
		};

		private static byte[][] LnxqComponents_N = new byte[102][]
		{
			new byte[2],
			new byte[2],
			new byte[2]
			{
				9,
				9
			},
			new byte[2]
			{
				9,
				8
			},
			new byte[2]
			{
				9,
				7
			},
			new byte[2]
			{
				9,
				6
			},
			new byte[2]
			{
				9,
				5
			},
			new byte[2]
			{
				9,
				4
			},
			new byte[2]
			{
				9,
				3
			},
			new byte[2]
			{
				9,
				2
			},
			new byte[2]
			{
				9,
				1
			},
			new byte[2]
			{
				9,
				0
			},
			new byte[2]
			{
				8,
				9
			},
			new byte[2]
			{
				8,
				8
			},
			new byte[2]
			{
				8,
				7
			},
			new byte[2]
			{
				8,
				6
			},
			new byte[2]
			{
				8,
				5
			},
			new byte[2]
			{
				8,
				4
			},
			new byte[2]
			{
				8,
				3
			},
			new byte[2]
			{
				8,
				2
			},
			new byte[2]
			{
				8,
				1
			},
			new byte[2]
			{
				8,
				0
			},
			new byte[2]
			{
				7,
				9
			},
			new byte[2]
			{
				7,
				8
			},
			new byte[2]
			{
				7,
				7
			},
			new byte[2]
			{
				7,
				6
			},
			new byte[2]
			{
				7,
				5
			},
			new byte[2]
			{
				7,
				4
			},
			new byte[2]
			{
				7,
				3
			},
			new byte[2]
			{
				7,
				2
			},
			new byte[2]
			{
				7,
				1
			},
			new byte[2]
			{
				7,
				0
			},
			new byte[2]
			{
				6,
				9
			},
			new byte[2]
			{
				6,
				8
			},
			new byte[2]
			{
				6,
				7
			},
			new byte[2]
			{
				6,
				6
			},
			new byte[2]
			{
				6,
				5
			},
			new byte[2]
			{
				6,
				4
			},
			new byte[2]
			{
				6,
				3
			},
			new byte[2]
			{
				6,
				2
			},
			new byte[2]
			{
				6,
				1
			},
			new byte[2]
			{
				6,
				0
			},
			new byte[2]
			{
				5,
				9
			},
			new byte[2]
			{
				5,
				8
			},
			new byte[2]
			{
				5,
				7
			},
			new byte[2]
			{
				5,
				6
			},
			new byte[2]
			{
				5,
				5
			},
			new byte[2]
			{
				5,
				4
			},
			new byte[2]
			{
				5,
				3
			},
			new byte[2]
			{
				5,
				2
			},
			new byte[2]
			{
				5,
				1
			},
			new byte[2]
			{
				5,
				0
			},
			new byte[2]
			{
				4,
				9
			},
			new byte[2]
			{
				4,
				8
			},
			new byte[2]
			{
				4,
				7
			},
			new byte[2]
			{
				4,
				6
			},
			new byte[2]
			{
				4,
				5
			},
			new byte[2]
			{
				4,
				4
			},
			new byte[2]
			{
				4,
				3
			},
			new byte[2]
			{
				4,
				2
			},
			new byte[2]
			{
				4,
				1
			},
			new byte[2]
			{
				4,
				0
			},
			new byte[2]
			{
				3,
				9
			},
			new byte[2]
			{
				3,
				8
			},
			new byte[2]
			{
				3,
				7
			},
			new byte[2]
			{
				3,
				6
			},
			new byte[2]
			{
				3,
				5
			},
			new byte[2]
			{
				3,
				4
			},
			new byte[2]
			{
				3,
				3
			},
			new byte[2]
			{
				3,
				2
			},
			new byte[2]
			{
				3,
				1
			},
			new byte[2]
			{
				3,
				0
			},
			new byte[2]
			{
				2,
				9
			},
			new byte[2]
			{
				2,
				8
			},
			new byte[2]
			{
				2,
				7
			},
			new byte[2]
			{
				2,
				6
			},
			new byte[2]
			{
				2,
				5
			},
			new byte[2]
			{
				2,
				4
			},
			new byte[2]
			{
				2,
				3
			},
			new byte[2]
			{
				2,
				2
			},
			new byte[2]
			{
				2,
				1
			},
			new byte[2]
			{
				2,
				0
			},
			new byte[2]
			{
				1,
				9
			},
			new byte[2]
			{
				1,
				8
			},
			new byte[2]
			{
				1,
				7
			},
			new byte[2]
			{
				1,
				6
			},
			new byte[2]
			{
				1,
				5
			},
			new byte[2]
			{
				1,
				4
			},
			new byte[2]
			{
				1,
				3
			},
			new byte[2]
			{
				1,
				2
			},
			new byte[2]
			{
				1,
				1
			},
			new byte[2]
			{
				1,
				0
			},
			new byte[2]
			{
				0,
				9
			},
			new byte[2]
			{
				0,
				8
			},
			new byte[2]
			{
				0,
				7
			},
			new byte[2]
			{
				0,
				6
			},
			new byte[2]
			{
				0,
				5
			},
			new byte[2]
			{
				0,
				4
			},
			new byte[2]
			{
				0,
				3
			},
			new byte[2]
			{
				0,
				2
			},
			new byte[2]
			{
				0,
				1
			},
			new byte[2]
		};

		private static byte[][] LnxqDigit_P = new byte[10][]
		{
			new byte[10]
			{
				1,
				2,
				3,
				4,
				5,
				6,
				7,
				8,
				9,
				10
			},
			new byte[10]
			{
				11,
				12,
				13,
				14,
				15,
				16,
				17,
				18,
				19,
				20
			},
			new byte[10]
			{
				21,
				22,
				23,
				24,
				25,
				26,
				27,
				28,
				29,
				30
			},
			new byte[10]
			{
				31,
				32,
				33,
				34,
				35,
				36,
				37,
				38,
				39,
				40
			},
			new byte[10]
			{
				41,
				42,
				43,
				44,
				45,
				46,
				47,
				48,
				49,
				50
			},
			new byte[10]
			{
				51,
				52,
				53,
				54,
				55,
				56,
				57,
				58,
				59,
				60
			},
			new byte[10]
			{
				61,
				62,
				63,
				64,
				65,
				66,
				67,
				68,
				69,
				70
			},
			new byte[10]
			{
				71,
				72,
				73,
				74,
				75,
				76,
				77,
				78,
				79,
				80
			},
			new byte[10]
			{
				81,
				82,
				83,
				84,
				85,
				86,
				87,
				88,
				89,
				90
			},
			new byte[10]
			{
				91,
				92,
				93,
				94,
				95,
				96,
				97,
				98,
				99,
				100
			}
		};

		private static byte[][] LnxqDigit_N = new byte[10][]
		{
			new byte[10]
			{
				101,
				100,
				99,
				98,
				97,
				96,
				95,
				94,
				93,
				92
			},
			new byte[10]
			{
				91,
				90,
				89,
				88,
				87,
				86,
				85,
				84,
				83,
				82
			},
			new byte[10]
			{
				81,
				80,
				79,
				78,
				77,
				76,
				75,
				74,
				73,
				72
			},
			new byte[10]
			{
				71,
				70,
				69,
				68,
				67,
				66,
				65,
				64,
				63,
				62
			},
			new byte[10]
			{
				61,
				60,
				59,
				58,
				57,
				56,
				55,
				54,
				53,
				52
			},
			new byte[10]
			{
				51,
				50,
				49,
				48,
				47,
				46,
				45,
				44,
				43,
				42
			},
			new byte[10]
			{
				41,
				40,
				39,
				38,
				37,
				36,
				35,
				34,
				33,
				32
			},
			new byte[10]
			{
				31,
				30,
				29,
				28,
				27,
				26,
				25,
				24,
				23,
				22
			},
			new byte[10]
			{
				21,
				20,
				19,
				18,
				17,
				16,
				15,
				14,
				13,
				12
			},
			new byte[10]
			{
				11,
				10,
				9,
				8,
				7,
				6,
				5,
				4,
				3,
				2
			}
		};

		private OracleNumberCore()
		{
		}

		internal static bool IsPositive(byte[] byteRep)
		{
			if ((byteRep[0] & 0x80u) != 0)
			{
				return true;
			}
			return false;
		}

		internal static bool IsZero(byte[] byteRep)
		{
			if (byteRep[0] == 128 && byteRep.Length == 1)
			{
				return true;
			}
			return false;
		}

		internal static bool IsInfinity(byte[] byteRep)
		{
			if ((byteRep.Length == 2 && byteRep[0] == byte.MaxValue && byteRep[1] == (byte)(LNXBASE + 1)) || (byteRep[0] == 0 && byteRep.Length == 1))
			{
				return true;
			}
			return false;
		}

		internal static bool IsInt(byte[] byteRep)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.IsInt);
			}
			try
			{
				if (IsZero(byteRep))
				{
					return true;
				}
				if (IsInfinity(byteRep))
				{
					return false;
				}
				sbyte[] array = FromLnxFmt(byteRep);
				sbyte b = array[0];
				if ((byte)(array.Length - 1) > b + 1)
				{
					return false;
				}
				return true;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.IsInt, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.IsInt);
				}
			}
		}

		internal static bool IsPositiveInfinity(byte[] byteRep)
		{
			if (byteRep.Length == 2 && byteRep[0] == byte.MaxValue && byteRep[1] == (byte)(LNXBASE + 1))
			{
				return true;
			}
			return false;
		}

		internal static bool IsNegativeInfinity(byte[] byteRep)
		{
			if (byteRep.Length == 1 && byteRep[0] == 0)
			{
				return true;
			}
			return false;
		}

		internal static bool IsNaN(byte[] byteRep, int offset = 0, int len = 0)
		{
			if (len == 0)
			{
				len = byteRep.Length;
			}
			if (len != 8)
			{
				return false;
			}
			if (byteRep[offset] != NANREPD[0])
			{
				return false;
			}
			if (byteRep[1 + offset] != NANREPD[1])
			{
				return false;
			}
			if (byteRep[2 + offset] != NANREPD[2])
			{
				return false;
			}
			if (byteRep[3 + offset] != NANREPD[3])
			{
				return false;
			}
			if (byteRep[4 + offset] != NANREPD[4])
			{
				return false;
			}
			if (byteRep[5 + offset] != NANREPD[5])
			{
				return false;
			}
			if (byteRep[6 + offset] != NANREPD[6])
			{
				return false;
			}
			if (byteRep[7 + offset] != NANREPD[7])
			{
				return false;
			}
			return true;
		}

		internal static byte[] GetPositiveInfinityByteRep()
		{
			return new byte[2]
			{
				255,
				(byte)(LNXBASE + 1)
			};
		}

		internal static byte[] GetNegativeInfinityByteRep()
		{
			return new byte[1]
			{
				0
			};
		}

		internal static byte[] GetZeroByteRep()
		{
			return new byte[1]
			{
				128
			};
		}

		internal static byte[] GetByteRep(double doubleNum)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.GetByteRep);
			}
			try
			{
				if (double.IsNaN(doubleNum))
				{
					return NANREPD;
				}
				if (doubleNum == 0.0)
				{
					return GetZeroByteRep();
				}
				if (double.IsPositiveInfinity(doubleNum))
				{
					return GetPositiveInfinityByteRep();
				}
				if (double.IsNegativeInfinity(doubleNum))
				{
					return GetNegativeInfinityByteRep();
				}
				return lnxren(doubleNum);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.GetByteRep, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.GetByteRep);
				}
			}
		}

		public static bool isValid(byte[] num)
		{
			if (IsNaN(num))
			{
				return true;
			}
			byte b = (byte)num.Length;
			if (IsPositive(num))
			{
				if (b == 1)
				{
					return IsZero(num);
				}
				if (num[0] == byte.MaxValue && num[1] == (byte)(LNXBASE + 1))
				{
					return b == 2;
				}
				if (b > 21)
				{
					return false;
				}
				if (num[1] < 2 || num[b - 1] < 2)
				{
					return false;
				}
				for (int i = 1; i < b; i++)
				{
					byte b2 = num[i];
					if (b2 < 1 || b2 > LNXBASE)
					{
						return false;
					}
				}
				return true;
			}
			if (b < 3)
			{
				return IsNegativeInfinity(num);
			}
			if (b > 21)
			{
				return false;
			}
			if (num[b - 1] != LNXBASE + 2)
			{
				if (b <= 20)
				{
					return false;
				}
			}
			else
			{
				b = (byte)(b - 1);
			}
			if (num[1] > LNXBASE || num[b - 1] > LNXBASE)
			{
				return false;
			}
			for (int j = 1; j < b; j++)
			{
				byte b2 = num[j];
				if (b2 < 2 || b2 > LNXBASE + 1)
				{
					return false;
				}
			}
			return true;
		}

		internal static sbyte[] FromLnxFmt(byte[] num)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.FromLnxFmt);
			}
			try
			{
				int num2 = num.Length;
				sbyte[] array;
				if (IsPositive(num))
				{
					array = new sbyte[num2];
					array[0] = (sbyte)((num[0] & -129) - 65);
					for (int i = 1; i < num2; i++)
					{
						array[i] = (sbyte)(num[i] - 1);
					}
				}
				else
				{
					array = ((num2 - 1 != 20 || num[num2 - 1] == (sbyte)(LNXBASE + 2)) ? new sbyte[num2 - 1] : new sbyte[num2]);
					array[0] = (sbyte)((~num[0] & -129) - 65);
					for (int j = 1; j < array.Length; j++)
					{
						array[j] = (sbyte)(LNXBASE + 1 - num[j]);
					}
				}
				return array;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.FromLnxFmt, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.FromLnxFmt);
				}
			}
		}

		internal static byte[] ToLnxFmt(byte[] num, bool pos)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.ToLnxFmt);
			}
			try
			{
				int num2 = num.Length;
				byte[] array;
				if (pos)
				{
					array = new byte[num2];
					array[0] = (byte)(num[0] + 128 + 64 + 1);
					for (int i = 1; i < num2; i++)
					{
						array[i] = (byte)(num[i] + 1);
					}
				}
				else
				{
					array = ((num2 - 1 >= 20) ? new byte[num2] : new byte[num2 + 1]);
					array[0] = (byte)(~(num[0] + 128 + 64 + 1));
					int i;
					for (i = 1; i < num2; i++)
					{
						array[i] = (byte)(LNXBASE + 1 - num[i]);
					}
					if (i <= 20)
					{
						array[i] = (byte)(LNXBASE + 2);
					}
				}
				return array;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.ToLnxFmt, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.ToLnxFmt);
				}
			}
		}

		private static byte[] SetLength(byte[] oranum, int size)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.SetLength);
			}
			try
			{
				byte[] array;
				if (IsPositive(oranum))
				{
					array = new byte[size];
				}
				else if (size <= 20 && oranum[size - 1] != LNXBASE + 2)
				{
					array = new byte[size + 1];
					array[size] = (byte)(LNXBASE + 2);
				}
				else
				{
					array = new byte[size];
				}
				Array.Copy(oranum, 0, array, 0, size);
				return array;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.SetLength, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.SetLength);
				}
			}
		}

		internal static byte[] lnxmin(long longNum)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxmin);
			}
			try
			{
				byte[] array = new byte[20];
				byte[] array2 = new byte[20];
				byte b = 0;
				if (longNum == 0L)
				{
					return GetZeroByteRep();
				}
				bool pos = ((longNum >= 0) ? true : false);
				int num = 0;
				while (longNum != 0L)
				{
					array[num] = (byte)Math.Abs(longNum % LNXBASE);
					longNum /= LNXBASE;
					num++;
				}
				byte b2 = (byte)(--num);
				int num2 = b2;
				while (b <= b2)
				{
					array2[b] = array[num2];
					b = (byte)(b + 1);
					num2--;
				}
				while (num > 0 && array2[num--] == 0)
				{
					b = (byte)(b - 1);
				}
				byte[] array3 = new byte[b + 1];
				array3[0] = b2;
				Array.Copy(array2, 0, array3, 1, b);
				return ToLnxFmt(array3, pos);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxmin, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxmin);
				}
			}
		}

		internal static byte[] lnxren(double doubleNum)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxren);
			}
			try
			{
				byte[] array = new byte[20];
				int num = 0;
				bool pos = ((!(doubleNum < 0.0)) ? true : false);
				doubleNum = Math.Abs(doubleNum);
				if (doubleNum < 1.0)
				{
					for (int i = 0; i < 8; i++)
					{
						if (powerTable[i][2] >= doubleNum)
						{
							num -= (int)powerTable[i][0];
							doubleNum *= powerTable[i][1];
						}
					}
					if (doubleNum < 1.0)
					{
						num--;
						doubleNum *= 100.0;
					}
				}
				else
				{
					for (int i = 0; i < 8; i++)
					{
						if (powerTable[i][1] <= doubleNum)
						{
							num += (int)powerTable[i][0];
							doubleNum *= powerTable[i][2];
						}
					}
				}
				if (num > 62)
				{
					throw new OverflowException();
				}
				if (num < -65)
				{
					throw new OverflowException();
				}
				bool flag = ((!(doubleNum >= 10.0)) ? true : false);
				byte b = 8;
				int j = 0;
				byte b2 = (byte)doubleNum;
				for (; j < b; j++)
				{
					array[j] = b2;
					doubleNum = (doubleNum - (double)(int)b2) * 100.0;
					b2 = (byte)doubleNum;
				}
				j = 7;
				if (flag)
				{
					if (b2 >= LNXBASE / 2)
					{
						array[j]++;
					}
				}
				else if (num == 62 && (array[j] + 5) / 10 * 10 == LNXBASE)
				{
					array[j] = (byte)((array[j] - 5) / 10 * 10);
				}
				else
				{
					array[j] = (byte)((array[j] + 5) / 10 * 10);
				}
				while (array[j] == LNXBASE)
				{
					if (j == 0)
					{
						num++;
						array[j] = 1;
						break;
					}
					array[j] = 0;
					j--;
					array[j]++;
				}
				j = 7;
				while (j != 0 && array[j] == 0)
				{
					b = (byte)(b - 1);
					j--;
				}
				byte[] array2 = new byte[b + 1];
				array2[0] = (byte)num;
				Array.Copy(array, 0, array2, 1, b);
				return ToLnxFmt(array2, pos);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxren, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxren);
				}
			}
		}

		internal static long lnxsni(byte[] num)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsni);
			}
			try
			{
				long num2 = 0L;
				sbyte[] array = FromLnxFmt(num);
				sbyte b = array[0];
				byte b2 = (byte)(array.Length - 1);
				if (IsZero(num))
				{
					return 0L;
				}
				if (IsInfinity(num) || compareBytes(num, MAX_LONG) > 0 || compareBytes(num, MIN_LONG) < 0)
				{
					throw new OverflowException();
				}
				int num3 = ((b2 > b + 1) ? (b + 1) : b2);
				for (int i = 0; i < num3; i++)
				{
					num2 = num2 * LNXBASE + array[i + 1];
				}
				for (int num4 = b - b2; num4 >= 0; num4--)
				{
					num2 *= LNXBASE;
				}
				return IsPositive(num) ? num2 : (-num2);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsni, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsni);
				}
			}
		}

		internal static double lnxnur(byte[] num)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxnur);
			}
			try
			{
				double result = 0.0;
				int num2 = 1;
				bool flag = false;
				int num3 = factorTable.Length;
				if (IsZero(num))
				{
					return result;
				}
				if (num[0] == 0 || num[0] == byte.MaxValue)
				{
					if (IsNegativeInfinity(num))
					{
						return double.NegativeInfinity;
					}
					if (IsPositiveInfinity(num))
					{
						return double.PositiveInfinity;
					}
					if (IsNaN(num))
					{
						return double.NaN;
					}
				}
				sbyte[] array = FromLnxFmt(num);
				bool flag2 = ((array[1] < 10) ? true : false);
				double num4 = factorTable[0][0];
				double num5 = factorTable[0][0] - (double)(num3 - 20);
				int num6;
				int num7;
				if ((double)array[0] > num4 || (double)array[0] < num5)
				{
					if ((double)array[0] > num4)
					{
						num6 = -1;
						num7 = (int)((double)array[0] - num4);
					}
					else
					{
						num6 = -1 + (num3 - 20);
						num7 = (int)((double)array[0] - num5);
					}
				}
				else
				{
					num6 = -1 + (int)(num4 - (double)array[0]);
					num7 = 0;
				}
				int num8 = array.Length - 1;
				if (flag2 ? (num8 > 8) : (num8 >= 8))
				{
					num8 = 8;
					flag = true;
				}
				switch (num8 % 4)
				{
				case 3:
				{
					int num9 = (array[1] * LNXBASE + array[2]) * LNXBASE + array[3];
					num6 += 3;
					result = ((!(factorTable[num6][1] < 1.0)) ? ((double)num9 * factorTable[num6][1]) : ((double)num9 / factorTable[num6][2]));
					num2 += 3;
					num8 -= 3;
					break;
				}
				case 2:
				{
					int num9 = array[1] * LNXBASE + array[2];
					num6 += 2;
					result = ((!(factorTable[num6][1] < 1.0)) ? ((double)num9 * factorTable[num6][1]) : ((double)num9 / factorTable[num6][2]));
					num2 += 2;
					num8 -= 2;
					break;
				}
				case 1:
				{
					int num9 = array[1];
					num6++;
					result = ((!(factorTable[num6][1] < 1.0)) ? ((double)num9 * factorTable[num6][1]) : ((double)num9 / factorTable[num6][2]));
					num2++;
					num8--;
					break;
				}
				default:
					result = 0.0;
					break;
				}
				while (num8 > 0)
				{
					int num9 = ((array[num2] * LNXBASE + array[num2 + 1]) * LNXBASE + array[num2 + 2]) * LNXBASE + array[num2 + 3];
					num6 += 4;
					result = ((!(factorTable[num6][1] < 1.0)) ? (result + (double)num9 * factorTable[num6][1]) : (result + (double)num9 / factorTable[num6][2]));
					num2 += 4;
					num8 -= 4;
				}
				if (flag)
				{
					if (flag2)
					{
						if (array[num2] > LNXBASE / 2)
						{
							int num9 = 1;
							result += (double)num9 * factorTable[num6][1];
						}
					}
					else
					{
						num2--;
						int num9 = ((array[num2] % 10 < 5) ? (array[num2] / 10 * 10) : ((array[num2] / 10 + 1) * 10));
						num9 -= array[num2];
						result += (double)num9 * factorTable[num6][1];
					}
				}
				if (num7 != 0)
				{
					int num10 = 0;
					while (num7 > 0)
					{
						if ((int)powerTable[num10][0] <= num7)
						{
							num7 -= (int)powerTable[num10][0];
							result *= powerTable[num10][1];
						}
						num10++;
					}
					while (num7 < 0)
					{
						if ((int)powerTable[num10][0] <= -num7)
						{
							num7 += (int)powerTable[num10][0];
							result *= powerTable[num10][2];
						}
						num10++;
					}
				}
				return IsPositive(num) ? result : (0.0 - result);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxnur, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxnur);
				}
			}
		}

		internal static void NegateNumber(byte[] oranum)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.NegateNumber);
			}
			try
			{
				for (int num = oranum.Length - 1; num > 0; num--)
				{
					oranum[num] = LnxqNegate[oranum[num]];
				}
				oranum[0] = (byte)(~oranum[0]);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.NegateNumber, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.NegateNumber);
				}
			}
		}

		internal static byte[] lnxabs(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxabs);
			}
			try
			{
				byte[] array = new byte[n.Length];
				if (IsPositive(n))
				{
					Array.Copy(n, 0, array, 0, n.Length);
					return array;
				}
				if (IsNegativeInfinity(n))
				{
					return GetPositiveInfinityByteRep();
				}
				int num = n.Length;
				if (n[num - 1] == LNXBASE + 2)
				{
					num--;
				}
				Array.Copy(n, 0, array, 0, num);
				NegateNumber(array);
				return SetLength(array, num);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxabs, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxabs);
				}
			}
		}

		internal static byte[] lnxneg(byte[] n)
		{
			try
			{
				if (IsZero(n))
				{
					return GetZeroByteRep();
				}
				if (IsPositiveInfinity(n))
				{
					return GetNegativeInfinityByteRep();
				}
				if (IsNegativeInfinity(n))
				{
					return GetPositiveInfinityByteRep();
				}
				int num = n.Length;
				if (!IsPositive(n) && n[num - 1] == LNXBASE + 2)
				{
					num--;
				}
				byte[] array = new byte[num];
				Array.Copy(n, 0, array, 0, num);
				NegateNumber(array);
				return SetLength(array, num);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxneg, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxneg);
				}
			}
		}

		internal static byte[] lnxadd(byte[] n1, byte[] n2)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxadd);
			}
			try
			{
				int num = n1.Length;
				int num2 = 0;
				int num3 = n2.Length;
				int num4 = 0;
				byte[] array = new byte[41];
				int num5 = 0;
				int num6 = 0;
				int num7 = 0;
				int num8 = 0;
				int num9 = 0;
				int num10 = 0;
				int num11 = num5 + 1;
				bool flag = n1[0] >> 7 != 0;
				int num12 = n1[0];
				if (!flag)
				{
					num12 = (byte)(~num12);
					if (n1[num - 1] == LNXBASE + 2)
					{
						num--;
					}
				}
				int num13 = num - 1;
				bool flag2 = n2[0] >> 7 != 0;
				int num14 = n2[0];
				if (!flag2)
				{
					num14 = (byte)(~num14);
					if (n2[num3 - 1] == LNXBASE + 2)
					{
						num3--;
					}
				}
				int num15 = num3 - 1;
				if (num12 == 255 && (num13 == 0 || n1[1] == LNXBASE + 1))
				{
					if (flag)
					{
						return GetPositiveInfinityByteRep();
					}
					return GetNegativeInfinityByteRep();
				}
				if (num14 == 255 && (num15 == 0 || n2[1] == LNXBASE + 1))
				{
					if (flag2)
					{
						return GetPositiveInfinityByteRep();
					}
					return GetNegativeInfinityByteRep();
				}
				bool flag3;
				int size;
				if (num12 == 128 && num13 == 0)
				{
					array = new byte[num3];
					Array.Copy(n2, 0, array, 0, num3);
					flag3 = flag2;
					size = num3;
					return SetLength(array, size);
				}
				if (num14 == 128 && num15 == 0)
				{
					array = new byte[num];
					Array.Copy(n1, 0, array, 0, num);
					flag3 = flag;
					size = num;
					return SetLength(array, size);
				}
				int num16 = num12 - num14;
				byte[][] array2;
				int num17;
				int num18;
				if (flag == flag2)
				{
					flag3 = flag;
					if (flag3)
					{
						array2 = LnxqAdd_PPP;
						num17 = 1;
						num18 = 1;
					}
					else
					{
						array2 = LnxqAdd_NNN;
						num17 = LNXBASE + 1;
						num18 = -1;
					}
				}
				else
				{
					int num19 = num16;
					if (num19 == 0)
					{
						int num20 = num2 + 1;
						int num21 = num4 + 1;
						int num22 = num2 + ((num13 < num15) ? num13 : num15);
						while (num20 <= num22 && (sbyte)n1[num20] + (sbyte)n2[num21] == LNXBASE + 2)
						{
							num20++;
							num21++;
						}
						num19 = ((num20 > num22) ? (num13 - num15) : (flag ? ((sbyte)n1[num20] + (sbyte)n2[num21] - (LNXBASE + 2)) : (LNXBASE + 2 - ((sbyte)n1[num20] + (sbyte)n2[num21]))));
					}
					if (num19 == 0)
					{
						return GetZeroByteRep();
					}
					flag3 = ((num19 > 0) ? flag : flag2);
					if (flag3)
					{
						array2 = LnxqAdd_PNP;
						num17 = 1;
						num18 = -1;
					}
					else
					{
						array2 = LnxqAdd_PNN;
						num17 = LNXBASE + 1;
						num18 = 1;
					}
				}
				int num23;
				int num24;
				int num25;
				int num27;
				int num28;
				bool flag4;
				int num26;
				if (num16 >= 0)
				{
					num23 = num12;
					if (num16 + num15 <= num13)
					{
						num8 = num16;
						num9 = num15;
						num10 = num13 - (num16 + num15);
						num24 = num2 + num8;
						num25 = 1;
						num6 = num24 + num9;
						num7 = num4 + num15;
						num26 = num2 + num13;
						num27 = 1;
						num28 = num13;
						flag4 = num10 != 0 && flag != flag3;
					}
					else if (num16 < num13)
					{
						num8 = num16;
						num9 = num13 - num16;
						num10 = num15 - num9;
						num24 = num2 + num8;
						num25 = 1;
						num6 = num2 + num13;
						num7 = num4 + num9;
						num26 = num4 + num15;
						num27 = 2;
						num28 = num16 + num15;
						flag4 = flag2 != flag3;
					}
					else
					{
						num8 = num13;
						num9 = -(num16 - num13);
						num10 = num15;
						num24 = num2 + num13;
						num25 = 1;
						num26 = num4 + num15;
						num27 = 2;
						num28 = num16 + num15;
						flag4 = flag2 != flag3;
					}
				}
				else
				{
					num23 = num14;
					num16 = -num16;
					if (num16 + num13 <= num15)
					{
						num8 = num16;
						num9 = num13;
						num10 = num15 - (num16 + num13);
						num24 = num4 + num8;
						num25 = 2;
						num6 = num2 + num13;
						num7 = num24 + num9;
						num26 = num4 + num15;
						num27 = 2;
						num28 = num15;
						flag4 = num10 != 0 && flag2 != flag3;
					}
					else if (num16 < num15)
					{
						num8 = num16;
						num9 = num15 - num16;
						num10 = num13 - num9;
						num24 = num4 + num8;
						num25 = 2;
						num6 = num2 + num9;
						num7 = num4 + num15;
						num26 = num2 + num13;
						num27 = 1;
						num28 = num16 + num13;
						flag4 = flag != flag3;
					}
					else
					{
						num8 = num15;
						num9 = -(num16 - num15);
						num10 = num13;
						num24 = num4 + num15;
						num25 = 2;
						num26 = num2 + num13;
						num27 = 1;
						num28 = num16 + num13;
						flag4 = flag != flag3;
					}
				}
				if (num28 > 20)
				{
					if (num16 > 20)
					{
						num9 = 0;
						num10 = 0;
						num28 = num8;
						flag4 = false;
					}
					else
					{
						num11 = 1;
					}
				}
				int num29 = num11 + (num28 - 1);
				int num30 = num29;
				if (num10 != 0)
				{
					int num31 = num30 - num10;
					if (num27 == 1)
					{
						array[num30] = n1[num26];
					}
					else
					{
						array[num30] = n2[num26];
					}
					num26--;
					num30--;
					if (flag4)
					{
						while (num30 > num31)
						{
							if (num27 == 1)
							{
								array[num30] = (byte)(n1[num26] + num18);
							}
							else
							{
								array[num30] = (byte)(n2[num26] + num18);
							}
							num26--;
							num30--;
						}
					}
					else
					{
						while (num30 > num31)
						{
							if (num27 == 1)
							{
								array[num30] = n1[num26];
							}
							else
							{
								array[num30] = n2[num26];
							}
							num26--;
							num30--;
						}
					}
				}
				if (num9 > 0)
				{
					int num31 = num30 - num9;
					int num32 = 0;
					int num33 = (flag4 ? (num32 + 1) : num32);
					do
					{
						num33 = num32 + (sbyte)n1[num6] + (sbyte)n2[num7] + array2[num33][1];
						array[num30] = array2[num33][0];
						num6--;
						num7--;
						num30--;
					}
					while (num30 > num31);
					flag4 = ((((uint)array2[num33][1] & (true ? 1u : 0u)) != 0) ? true : false);
				}
				else
				{
					int num34 = ((!flag4) ? num17 : ((num18 == 1) ? 2 : LNXBASE));
					int num31 = num30 + num9;
					while (num30 > num31)
					{
						array[num30] = (byte)num34;
						num30--;
					}
				}
				if (num8 != 0)
				{
					int num31 = num30 - num8;
					if (flag4)
					{
						int num35 = ((num18 != 1) ? 1 : LNXBASE) + ((!flag3) ? 1 : 0);
						int num36 = ((num18 == 1) ? 1 : LNXBASE) + ((!flag3) ? 1 : 0);
						do
						{
							if (num25 == 1)
							{
								flag4 = n1[num24] == num35;
								array[num30] = (byte)(flag4 ? num36 : (n1[num24] + num18));
							}
							else
							{
								flag4 = n2[num24] == num35;
								array[num30] = (byte)(flag4 ? num36 : (n2[num24] + num18));
							}
							num24--;
							num30--;
						}
						while (flag4 && num30 > num31);
					}
					while (num30 > num31)
					{
						if (num25 == 1)
						{
							array[num30] = n1[num24];
						}
						else
						{
							array[num30] = n2[num24];
						}
						num24--;
						num30--;
					}
				}
				if (flag4)
				{
					if (num23 == 255)
					{
						if (flag3)
						{
							return GetPositiveInfinityByteRep();
						}
						return GetNegativeInfinityByteRep();
					}
					num11--;
					array[num11] = (byte)(flag3 ? 2 : LNXBASE);
					num23++;
					num28++;
				}
				if (array[num11] == num17)
				{
					do
					{
						num11++;
						num23--;
						num28--;
					}
					while (array[num11] == num17);
					if (num23 < 128)
					{
						return GetZeroByteRep();
					}
				}
				if (num28 > 20)
				{
					num29 = num11 + 19;
					num28 = 20;
					if ((flag3 ? array[num29 + 1] : LnxqNegate[array[num29 + 1]]) > LNXBASE / 2)
					{
						int num37 = (flag3 ? LNXBASE : 2);
						if (!flag4)
						{
							array[num11 - 1] = (byte)num17;
						}
						while (array[num29] == num37)
						{
							num29--;
							num28--;
						}
						if (num29 < num11)
						{
							if (num23 == 255)
							{
								if (flag3)
								{
									return GetPositiveInfinityByteRep();
								}
								return GetNegativeInfinityByteRep();
							}
							num11--;
							num23++;
							num28 = 1;
						}
						array[num29] += (byte)(flag3 ? 1 : (-1));
					}
				}
				while (array[num29] == num17)
				{
					num29--;
					num28--;
				}
				if (num11 != 1)
				{
					byte[] array3 = new byte[41];
					Array.Copy(array, num11, array3, 1, num28);
					Array.Copy(array3, 1, array, 1, num28);
				}
				size = num28 + 1;
				if (!flag3 && size <= 20)
				{
					array[size] = (byte)(LNXBASE + 2);
					size++;
				}
				array[num5] = (byte)(flag3 ? (num23 - 256) : (255 - num23));
				return SetLength(array, size);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxadd, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxadd);
				}
			}
		}

		internal static byte[] lnxsub(byte[] n1, byte[] n2)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsub);
			}
			try
			{
				return lnxadd(n1, lnxneg(n2));
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsub, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsub);
				}
			}
		}

		internal static byte[] lnxmul(byte[] n1, byte[] n2)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxmul);
			}
			try
			{
				byte[] array = n1;
				int num = array.Length;
				byte[] array2 = n2;
				int num2 = array2.Length;
				byte[] array3 = new byte[22];
				_ = array3.Length;
				int[] array4 = new int[10];
				int[] array5 = new int[10];
				short num3 = 0;
				byte[] array6 = new byte[41];
				int num4 = 0;
				int num5 = 0;
				bool flag = array[0] >> 7 != 0;
				byte b = array[0];
				if (!flag)
				{
					b = (byte)(~b);
					if (array[num - 1] == LNXBASE + 2)
					{
						num--;
					}
				}
				bool flag2 = array2[0] >> 7 != 0;
				byte b2 = array2[0];
				if (!flag2)
				{
					b2 = (byte)(~b2);
					if (array2[num2 - 1] == LNXBASE + 2)
					{
						num2--;
					}
				}
				if (b == 128 && num == 1)
				{
					return GetZeroByteRep();
				}
				if (b2 == 128 && num2 == 1)
				{
					return GetZeroByteRep();
				}
				if ((b & 0xFF) == 255 && (num == 1 || array[1] == LNXBASE + 1))
				{
					if (flag == flag2)
					{
						return GetPositiveInfinityByteRep();
					}
					return GetNegativeInfinityByteRep();
				}
				if ((b2 & 0xFF) == 255 && (num2 == 1 || array2[1] == LNXBASE + 1))
				{
					if (flag == flag2)
					{
						return GetPositiveInfinityByteRep();
					}
					return GetNegativeInfinityByteRep();
				}
				if (num > num2)
				{
					byte[] array7 = array;
					array = array2;
					array2 = array7;
					int num6 = num;
					num = num2;
					num2 = num6;
					bool num7 = flag;
					flag = flag2;
					flag2 = num7;
				}
				int num8 = num / 2 - 1;
				int num9 = num8;
				int num10 = num - 2;
				if (flag)
				{
					if ((num & 1) == 0)
					{
						array4[num9] = array[num10 + 1] * LNXBASE - LNXBASE;
						num10--;
						num9--;
					}
					while (num10 > 0)
					{
						array4[num9] = array[num10] * LNXBASE + array[num10 + 1] - (LNXBASE + 1);
						num10 -= 2;
						num9--;
					}
				}
				else
				{
					if ((num & 1) == 0)
					{
						array4[num9] = (LNXBASE + 1) * LNXBASE - array[num10 + 1] * LNXBASE;
						num10--;
						num9--;
					}
					while (num10 > 0)
					{
						array4[num9] = (LNXBASE + 1) * (LNXBASE + 1) - (array[num10] * LNXBASE + array[num10 + 1]);
						num10 -= 2;
						num9--;
					}
				}
				int num11 = num2 / 2 - 1;
				int num12 = num11;
				int num13 = num2 - 2;
				if (flag2)
				{
					if ((num2 & 1) == 0)
					{
						array5[num12] = array2[num13 + 1] * LNXBASE - LNXBASE;
						num13--;
						num12--;
					}
					while (num13 > 0)
					{
						array5[num12] = array2[num13] * LNXBASE + array2[num13 + 1] - (LNXBASE + 1);
						num13 -= 2;
						num12--;
					}
				}
				else
				{
					if ((num2 & 1) == 0)
					{
						array5[num12] = (LNXBASE + 1) * LNXBASE - array2[num13 + 1] * LNXBASE;
						num13--;
						num12--;
					}
					while (num13 > 0)
					{
						array5[num12] = (LNXBASE + 1) * (LNXBASE + 1) - (array2[num13] * LNXBASE + array2[num13 + 1]);
						num13 -= 2;
						num12--;
					}
				}
				int num14;
				if (array4[0] * array5[0] < LNXBASE * LNXBASE * LNXBASE)
				{
					num3 = (short)((b & 0xFF) + (b2 & 0xFF) - 193);
					num14 = (num & 0xFE) + (num2 & 0xFE);
				}
				else
				{
					num3 = (short)((b & 0xFF) + (b2 & 0xFF) - 192);
					num14 = (num & 0xFE) + (num2 & 0xFE) + 1;
				}
				num4 = 1;
				int num15 = num14;
				if (num <= 3)
				{
					num5 = array4[0] * array5[num11];
					num5 = LnxmulSetDigit1(array6, num15, num5);
					num15 -= 2;
					for (num12 = num11 - 1; num12 >= 0; num12--)
					{
						num5 += array4[0] * array5[num12];
						num5 = LnxmulSetDigit1(array6, num15, num5);
						num15 -= 2;
					}
					LnxmulSetDigit2(array6, num15, num5);
					num15 -= 2;
				}
				else
				{
					num5 += array4[num8] * array5[num11];
					num5 = LnxmulSetDigit1(array6, num15, num5);
					num15 -= 2;
					for (num12 = num11 - 1; num12 > num11 - (num / 2 - 1); num12--)
					{
						for (int num16 = num11 - num12 + 1; num16 > 0; num16--)
						{
							num5 = LnxmulSetSum(array4, array5, num8, num12, num16 - 1, num5);
						}
						num5 = LnxmulSetDigit1(array6, num15, num5);
						num15 -= 2;
					}
					do
					{
						for (int num17 = num / 2; num17 > 0; num17--)
						{
							num5 = LnxmulSetSum(array4, array5, num8, num12, num17 - 1, num5);
						}
						num5 = LnxmulSetDigit1(array6, num15, num5);
						num15 -= 2;
						num12--;
					}
					while (num12 >= 0);
					for (num9 = num8 - 1; num9 > 0; num9--)
					{
						for (int num18 = num9 + 1; num18 > 0; num18--)
						{
							num5 = LnxmulSetSum(array4, array5, num9, 0, num18 - 1, num5);
						}
						num5 = LnxmulSetDigit1(array6, num15, num5);
						num15 -= 2;
					}
					num5 += array4[0] * array5[0];
					num5 = LnxmulSetDigit1(array6, num15, num5);
					num15 -= 2;
					LnxmulSetDigit2(array6, num15, num5);
					num15 -= 2;
				}
				if ((num14 & 1) == 0 && array6[num15] != 1)
				{
					num3 = (short)(num3 + 1);
					num14++;
					num4--;
				}
				while (array6[num4 + num14 - 2] == 1)
				{
					num14--;
				}
				if (num14 > 21)
				{
					num15 = num4 + 19;
					num14 = 21;
					if (array6[num15 + 1] > LNXBASE / 2)
					{
						while (array6[num15] == LNXBASE)
						{
							num15--;
							num14--;
						}
						if (num15 < num4)
						{
							array6[num4] = 2;
							num3 = (short)(num3 + 1);
							num14++;
						}
						array6[num15]++;
					}
					else
					{
						while (array6[num4 + num14 - 2] == 1)
						{
							num14--;
						}
					}
				}
				if ((num3 & 0xFFFF) > 255)
				{
					if (flag == flag2)
					{
						return GetPositiveInfinityByteRep();
					}
					return GetNegativeInfinityByteRep();
				}
				if ((num3 & 0xFFFF) < 128)
				{
					return GetZeroByteRep();
				}
				if (flag != flag2)
				{
					num14++;
					array3 = new byte[num14];
					array3[0] = (byte)(~num3);
					for (int i = 0; i < num14 - 1; i++)
					{
						array3[i + 1] = (byte)(LNXBASE + 2 - array6[num4 + i]);
					}
					array3[num14 - 1] = (byte)(LNXBASE + 2);
				}
				else
				{
					array3 = new byte[num14];
					array3[0] = (byte)num3;
					for (int i = 0; i < num14 - 1; i++)
					{
						array3[i + 1] = array6[num4 + i];
					}
				}
				return array3;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxmul, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxmul);
				}
			}
		}

		internal static byte[] lnxdiv(byte[] n1, byte[] n2)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxdiv);
			}
			try
			{
				int num = n1.Length;
				int num2 = n2.Length;
				byte[] array = new byte[22];
				_ = array.Length;
				int[] array2 = new int[22];
				int[] array3 = new int[10];
				_ = new byte[41];
				int[] array4 = new int[13];
				bool flag = n1[0] >> 7 != 0;
				byte b = n1[0];
				if (!flag)
				{
					b = (byte)(~b);
					if (n1[num - 1] == LNXBASE + 2)
					{
						num--;
					}
				}
				bool flag2 = n2[0] >> 7 != 0;
				byte b2 = n2[0];
				if (!flag2)
				{
					b2 = (byte)(~b2);
					if (n2[num2 - 1] == LNXBASE + 2)
					{
						num2--;
					}
				}
				if ((b2 & 0xFF) == 128 && num2 == 1)
				{
					if (flag == flag2)
					{
						return GetPositiveInfinityByteRep();
					}
					return GetNegativeInfinityByteRep();
				}
				if ((b & 0xFF) == 128 && num == 1)
				{
					return GetZeroByteRep();
				}
				int num3 = ((num != 1) ? 1 : 0);
				if (((b & 0xFF) == 255 && (num == 2 || n1[num3] == LNXBASE + 1)) || (num == 1 && n1[0] == 0))
				{
					if (flag == flag2)
					{
						return GetPositiveInfinityByteRep();
					}
					return GetNegativeInfinityByteRep();
				}
				num3 = ((num2 != 1) ? 1 : 0);
				if (((b2 & 0xFF) == 255 && (num2 == 2 || n2[num3] == LNXBASE + 1)) || (num2 == 1 && n2[0] == 0))
				{
					return GetZeroByteRep();
				}
				int num4 = num / 2 - 1;
				int num5 = 21;
				int num6 = num - 2;
				while (num5 > num4)
				{
					array2[num5] = 0;
					num5--;
				}
				if (flag)
				{
					if ((num & 1) == 0)
					{
						array2[num5] = n1[num6 + 1] * LNXBASE - LNXBASE;
						num6--;
						num5--;
					}
					while (num6 > 0)
					{
						array2[num5] = n1[num6] * LNXBASE + n1[num6 + 1] - (LNXBASE + 1);
						num6 -= 2;
						num5--;
					}
				}
				else
				{
					if ((num & 1) == 0)
					{
						array2[num5] = (LNXBASE + 1) * LNXBASE - n1[num6 + 1] * LNXBASE;
						num6--;
						num5--;
					}
					while (num6 > 0)
					{
						array2[num5] = (LNXBASE + 1) * (LNXBASE + 1) - (n1[num6] * LNXBASE + n1[num6 + 1]);
						num6 -= 2;
						num5--;
					}
				}
				int num7 = num2 / 2 - 1;
				int num8 = num7;
				int num9 = num2 - 2;
				if (flag2)
				{
					if ((num2 & 1) == 0)
					{
						array3[num8] = n2[num9 + 1] * LNXBASE - LNXBASE;
						num9--;
						num8--;
					}
					while (num9 > 0)
					{
						array3[num8] = n2[num9] * LNXBASE + n2[num9 + 1] - (LNXBASE + 1);
						num9 -= 2;
						num8--;
					}
				}
				else
				{
					if ((num2 & 1) == 0)
					{
						array3[num8] = (LNXBASE + 1) * LNXBASE - n2[num9 + 1] * LNXBASE;
						num9--;
						num8--;
					}
					while (num9 > 0)
					{
						array3[num8] = (LNXBASE + 1) * (LNXBASE + 1) - (n2[num9] * LNXBASE + n2[num9 + 1]);
						num9 -= 2;
						num8--;
					}
				}
				int num10 = 0;
				int num11 = -1;
				int num19;
				if (num2 <= 3)
				{
					num5 = 0;
					int num12 = array2[0];
					int num13 = array3[0];
					do
					{
						int num14 = num12 / num13;
						num5++;
						num12 -= num14 * num13;
						num12 = num12 * LNXDIV_LNXBASE_SQUARED + array2[num5];
						num11++;
						array4[num11] = num14;
					}
					while ((num12 != 0 || num5 < num4) && num11 < 10 + ((array4[0] != 0) ? 1 : 2));
				}
				else
				{
					int num15 = 0;
					int num16 = num7;
					double num17 = (double)(array2[num15] * LNXDIV_LNXBASE_SQUARED) + (double)array2[num15 + 1];
					double num18 = (double)(array3[0] * LNXDIV_LNXBASE_SQUARED) + (double)array3[1];
					do
					{
						int i = (int)(num17 / num18);
						if (i != 0)
						{
							num5 = num15 + 2;
							num8 = 2;
							while (num5 <= num16)
							{
								array2[num5] -= i * array3[num8];
								num5++;
								num8++;
							}
						}
						num17 -= (double)i * num18;
						num17 = num17 * (double)LNXDIV_LNXBASE_SQUARED + (double)array2[num15 + 2];
						if (i >= LNXDIV_LNXBASE_SQUARED)
						{
							num19 = num11;
							while (array4[num19] == LNXDIV_LNXBASE_SQUARED - 1)
							{
								array4[num19] = 0;
								num19--;
							}
							array4[num19]++;
							i -= LNXDIV_LNXBASE_SQUARED;
						}
						for (; i < 0; i += LNXDIV_LNXBASE_SQUARED)
						{
							num19 = num11;
							while (array4[num19] == 0)
							{
								array4[num19] = LNXDIV_LNXBASE_SQUARED - 1;
								num19--;
							}
							array4[num19]--;
						}
						num11++;
						array4[num11] = i;
						if (num15 >= num4 && ((num17 < 0.0) ? (0.0 - num17) : num17) < 0.1)
						{
							for (num5 = num15 + 2; num5 <= num16 && array2[num5] == 0; num5++)
							{
							}
							if (num5 > num16)
							{
								break;
							}
						}
						num15++;
						num16++;
					}
					while (num11 < 10 + ((array4[0] != 0) ? 1 : 2));
				}
				if (array4[0] == 0)
				{
					num10++;
				}
				while (array4[num11] == 0)
				{
					num11--;
				}
				int num20 = ((array4[num10] >= LNXBASE) ? 1 : 0);
				int num21 = ((array4[num11] % LNXBASE != 0) ? 1 : 0);
				int num22 = 2 * (num11 - num10) + num20 + num21;
				if (num22 > 20)
				{
					if (num20 > 0)
					{
						num11 = num10 + 9;
						array4[num11] += ((array4[num11 + 1] >= LNXDIV_LNXBASE_SQUARED / 2) ? 1 : 0);
					}
					else
					{
						num11 = num10 + 10;
						array4[num11] = (array4[num11] + LNXBASE / 2) / LNXBASE * LNXBASE;
					}
					if (array4[num11] == LNXDIV_LNXBASE_SQUARED)
					{
						do
						{
							num11--;
						}
						while (array4[num11] == LNXDIV_LNXBASE_SQUARED - 1);
						array4[num11]++;
					}
					if (array4[0] != 0)
					{
						num10 = 0;
					}
					while (array4[num11] == 0)
					{
						num11--;
					}
					num20 = ((array4[num10] >= LNXBASE) ? 1 : 0);
					num21 = ((array4[num11] % LNXBASE != 0) ? 1 : 0);
					num22 = 2 * (num11 - num10) + num20 + num21;
				}
				int num23 = (b & 0xFF) - (b2 & 0xFF) - ((array4[0] == 0) ? 1 : 0) + 193;
				if (num23 > 255)
				{
					if (flag == flag2)
					{
						return GetPositiveInfinityByteRep();
					}
					return GetNegativeInfinityByteRep();
				}
				if (num23 < 128)
				{
					return GetZeroByteRep();
				}
				int num24 = num22 + 1;
				array = new byte[num24];
				int num25 = num22;
				num19 = num11;
				if (num21 == 0)
				{
					array[num25] = (byte)(array4[num19] / LNXBASE + 1);
					num25--;
					num19--;
				}
				while (num25 > 1)
				{
					int num26 = array4[num19] / LNXBASE;
					int num27 = array4[num19] - num26 * LNXBASE;
					array[num25] = (byte)(num27 + 1);
					num25--;
					array[num25] = (byte)(num26 + 1);
					num25--;
					num19--;
				}
				if (num20 == 0)
				{
					array[num25] = (byte)(array4[num19] + 1);
				}
				array[0] = (byte)num23;
				if (flag != flag2)
				{
					num24++;
					byte[] array5;
					if (num24 > 20)
					{
						array5 = new byte[21];
						num24 = 21;
					}
					else
					{
						array5 = new byte[num24];
					}
					array5[0] = (byte)(~num23);
					int j;
					for (j = 0; j < num24 - 2; j++)
					{
						array5[j + 1] = (byte)(LNXBASE + 2 - array[j + 1]);
					}
					if (num24 <= 20)
					{
						array5[num24 - 1] = (byte)(LNXBASE + 2);
					}
					else if (array.Length == 20)
					{
						array5[num24 - 1] = (byte)(LNXBASE + 2);
					}
					else
					{
						array5[j + 1] = (byte)(LNXBASE + 2 - array[j + 1]);
					}
					return array5;
				}
				return array;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxdiv, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxdiv);
				}
			}
		}

		internal static byte[] lnxmod(byte[] n1, byte[] n2)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxmod);
			}
			try
			{
				byte[] n3 = lnxdiv(n1, n2);
				byte[] n4 = lnxtru(n3, 0);
				n3 = lnxmul(n2, n4);
				return lnxsub(n1, n3);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxmod, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxmod);
				}
			}
		}

		internal static byte[] lnxsqr(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsqr);
			}
			try
			{
				int num = n.Length;
				int[] array = new int[29];
				int[] array2 = new int[29];
				if (!IsPositive(n))
				{
					return GetNegativeInfinityByteRep();
				}
				if (IsPositiveInfinity(n))
				{
					return GetPositiveInfinityByteRep();
				}
				if (IsZero(n))
				{
					return GetZeroByteRep();
				}
				int num2 = (n[0] & 0xFF) - 193;
				for (int i = 1; i < num; i++)
				{
					array[i] = n[i] - 1;
				}
				int num3 = 1;
				int num4 = num3 + 20 + 3;
				int num5;
				if (((uint)(num2 + 128) & (true ? 1u : 0u)) != 0)
				{
					num5 = ((array[num3] * LNXBASE + array[num3 + 1]) * LNXBASE + array[num3 + 2]) * LNXBASE + array[num3 + 3];
					num3 += 3;
				}
				else
				{
					num5 = (array[num3] * LNXBASE + array[num3 + 1]) * LNXBASE + array[num3 + 2];
					num3 += 2;
				}
				int num6 = (int)(Math.Sqrt(num5) * (double)LNXBASE);
				array2[1] = num6 / (LNXBASE * LNXBASE);
				array2[2] = num6 / LNXBASE % LNXBASE;
				array2[3] = num6 % LNXBASE;
				num5 -= array2[1] * num6;
				num5 = num5 * LNXBASE + array[num3 + 1];
				num5 -= array2[2] * num6;
				num5 = num5 * LNXBASE + array[num3 + 2];
				num5 -= array2[3] * num6;
				num3 += 3;
				num6 *= 2;
				int num7 = 3;
				int num8 = num7 + 1;
				int num10;
				while (num3 < num4)
				{
					num5 = num5 * LNXBASE + array[num3];
					int num9 = num5 / num6;
					num5 -= num9 * num6;
					array2[num8] = num9;
					num10 = ((num7 + (num4 - num3) < num8) ? (num7 + (num4 - num3)) : num8);
					if (num9 != 0)
					{
						int num11 = num3 + 1;
						for (int j = num7 + 1; j < num10; j++)
						{
							array[num11] -= 2 * num9 * array2[j];
							num11++;
						}
						if (num11 < num4)
						{
							array[num11] -= num9 * num9;
						}
					}
					else if (num5 == 0)
					{
						int num11;
						for (num11 = num3 + 1; num11 < num4 && array[num11] == 0; num11++)
						{
						}
						if (num11 == num4)
						{
							break;
						}
					}
					num3++;
					num8++;
				}
				num10 = num8;
				num8--;
				array2[0] = 0;
				while (num8 > 0)
				{
					while (array2[num8] > LNXBASE - 1)
					{
						array2[num8] -= LNXBASE;
						array2[num8 - 1]++;
					}
					while (array2[num8] < 0)
					{
						array2[num8] += LNXBASE;
						array2[num8 - 1]--;
					}
					num8--;
				}
				num2 = (num2 - ((num2 + 128) & 1)) / 2 + 1;
				while (array2[num8] == 0)
				{
					num8++;
					num2--;
					if (num2 < -65)
					{
						return GetZeroByteRep();
					}
				}
				do
				{
					num10--;
				}
				while (array2[num10] == 0);
				int num12 = num10 - num8 + 2;
				if (num12 > 21)
				{
					num10 = num8 + 20;
					if (array2[num10] >= LNXBASE / 2)
					{
						do
						{
							num10--;
						}
						while (array2[num10] == LNXBASE - 1);
						array2[num10]++;
					}
					else
					{
						do
						{
							num10--;
						}
						while (array2[num10] == 0);
					}
					if (num10 < num8)
					{
						num8 = num10;
						num2++;
						if (num2 > 62)
						{
							return GetPositiveInfinityByteRep();
						}
					}
					num12 = num10 - num8 + 2;
				}
				byte[] array3 = new byte[num12];
				array3[0] = (byte)(num2 - 63);
				for (int i = num8; i <= num10; i++)
				{
					array3[i - (num8 - 1)] = (byte)(array2[i] + 1);
				}
				return array3;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsqr, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsqr);
				}
			}
		}

		internal static byte[] lnxceil(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxceil);
			}
			try
			{
				byte[] array = lnxtru(n, 0);
				if (compareBytes(array, n) != 0 && IsPositive(n))
				{
					array = lnxadd(array, lnxqone);
				}
				return array;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxceil, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxceil);
				}
			}
		}

		internal static byte[] lnxshift(byte[] n, int nDig)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxshift);
			}
			try
			{
				int num = n.Length;
				byte[] array = new byte[22];
				int num2 = 0;
				int num3 = 0;
				int num4 = ((num != 1) ? 1 : 0);
				byte[] array2;
				if (((n[0] & 0xFF) == 128 && num == 1) || (num == 2 && (n[0] & 0xFF) == 255 && n[num4] == LNXBASE + 1) || (num == 1 && n[0] == 0))
				{
					array2 = new byte[num];
					for (num4 = 0; num4 < num; num4++)
					{
						array2[num4] = n[num4];
					}
					return array2;
				}
				bool flag = n[0] >> 7 == 0;
				int num5 = (flag ? ((255 - n[0]) & 0xFF) : (n[0] & 0xFF));
				int num6 = num;
				if ((nDig & 1) > 0)
				{
					byte[][] array3;
					byte[][] array4;
					byte b;
					if (flag)
					{
						if (n[num6 - 1] == LNXBASE + 2)
						{
							num6--;
						}
						array3 = LnxqComponents_N;
						array4 = LnxqDigit_N;
						b = (byte)(LNXBASE + 1);
					}
					else
					{
						array3 = LnxqComponents_P;
						array4 = LnxqDigit_P;
						b = 1;
					}
					if (array3[n[1]][0] != 0)
					{
						num5 = ((nDig >= 0) ? (num5 + (nDig / 2 + 1)) : (num5 - -nDig / 2));
						num2 = num6 - 2;
						num3 = num6 - 1;
						bool flag2;
						if (num6 > 20)
						{
							flag2 = array3[n[num2 + 1]][1] >= 5;
						}
						else
						{
							array[num3 + 1] = array4[array3[n[num2 + 1]][1]][0];
							num6++;
							flag2 = false;
						}
						while (num2 > 0)
						{
							array[num3] = array4[array3[n[num2]][1]][array3[n[num2 + 1]][0]];
							num2--;
							num3--;
						}
						array[1] = array4[0][array3[n[num2 + 1]][0]];
						if (flag2)
						{
							int num7 = (flag ? 2 : LNXBASE);
							int num8 = ((!flag) ? 1 : (-1));
							num3 = 20;
							while (array[num3] == num7)
							{
								num3--;
								num6--;
							}
							array[num3] += (byte)num8;
						}
					}
					else
					{
						num5 = ((nDig >= 0) ? (num5 + nDig / 2) : (num5 - (-nDig / 2 + 1)));
						num2 = 1;
						for (num3 = 1; num3 < num6 - 1; num3++)
						{
							array[num3] = array4[array3[n[num2]][1]][array3[n[num2 + 1]][0]];
							num2++;
						}
						array[num3] = array4[array3[n[num2]][1]][0];
					}
					while (array[num6 - 1] == b)
					{
						num6--;
					}
					if (flag)
					{
						num6++;
						array[num6 - 1] = (byte)(LNXBASE + 2);
					}
				}
				else
				{
					num5 = ((nDig >= 0) ? (num5 + nDig / 2) : (num5 - -nDig / 2));
					for (num4 = 1; num4 < num6; num4++)
					{
						array[num4] = n[num4];
					}
				}
				if (num5 > 255)
				{
					return flag ? new byte[1]
					{
						0
					} : new byte[2]
					{
						255,
						(byte)(LNXBASE + 1)
					};
				}
				if (num5 < 128)
				{
					return new byte[1]
					{
						128
					};
				}
				array[0] = (flag ? ((byte)(255 - num5)) : ((byte)num5));
				array2 = new byte[num6];
				for (num4 = 0; num4 < num6; num4++)
				{
					array2[num4] = array[num4];
				}
				return array2;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxshift, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxshift);
				}
			}
		}

		internal static byte[] lnxfpr(byte[] n, int precision)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxfpr);
			}
			try
			{
				int num = n.Length;
				if (IsZero(n))
				{
					return GetZeroByteRep();
				}
				if (IsNegativeInfinity(n))
				{
					return GetNegativeInfinityByteRep();
				}
				if (IsPositiveInfinity(n))
				{
					return GetPositiveInfinityByteRep();
				}
				if (precision < 0)
				{
					return GetZeroByteRep();
				}
				bool flag;
				int num2;
				bool flag2;
				byte b;
				byte b2;
				int num3;
				if (flag = IsPositive(n))
				{
					precision += (((n[1] & 0xFF) >= 11) ? 1 : 2);
					num2 = precision >> 1;
					flag2 = (precision & 1) == 1;
					b = 1;
					b2 = (byte)LNXBASE;
					num3 = 1;
				}
				else
				{
					precision += (((n[1] & 0xFF) <= 91) ? 1 : 2);
					num2 = precision >> 1;
					flag2 = (precision & 1) == 1;
					b = (byte)(LNXBASE + 1);
					b2 = 2;
					num3 = -1;
					num -= (((n[num - 1] & 0xFF) == LNXBASE + 2) ? 1 : 0);
				}
				byte[] array = new byte[num];
				Array.Copy(n, 0, array, 0, num);
				if (num2 > num - 1 || (num2 == num - 1 && (flag2 || LnxqFirstDigit[n[num2]] == 1)))
				{
					return SetLength(n, num);
				}
				if ((num2 == 0 && (!flag2 || (flag ? (n[1] < 51) : (n[1] > 51)))) || (num2 == 1 && !flag2 && (flag ? (n[1] < 6) : (n[1] > 96))))
				{
					return GetZeroByteRep();
				}
				if (num2 == 0)
				{
					if (IsInfinity(n))
					{
						if (flag)
						{
							return GetPositiveInfinityByteRep();
						}
						return GetNegativeInfinityByteRep();
					}
					array[0] = (byte)(n[0] + num3);
					array[1] = (byte)(b + num3);
					return SetLength(array, 2);
				}
				byte b3;
				byte b4 = (b3 = (byte)num2);
				if (flag2)
				{
					if (flag ? (n[b3 + 1] > 50) : (n[b3 + 1] < 52))
					{
						array[b4] = (byte)(n[b3] + num3);
					}
					else
					{
						array[b4] = n[b3];
					}
				}
				else
				{
					array[b4] = (flag ? LnxqRound_P[n[b3]] : LnxqRound_N[n[b3]]);
				}
				b3 = (byte)(b3 - 1);
				int size;
				if (array[b4] == b2 + num3)
				{
					while (b3 > 0 && n[b3] == b2)
					{
						b3 = (byte)(b3 - 1);
					}
					if (b3 == 0)
					{
						if (IsInfinity(n))
						{
							if (flag)
							{
								return GetPositiveInfinityByteRep();
							}
							return GetNegativeInfinityByteRep();
						}
						array[0] = (byte)(n[0] + num3);
						array[1] = (byte)(b + num3);
						return SetLength(array, 2);
					}
					array[b3] = (byte)(n[b3] + num3);
					size = b3 + 1;
					b3 = (byte)(b3 - 1);
				}
				else if (array[b4] == b)
				{
					while (n[b3] == b)
					{
						b3 = (byte)(b3 - 1);
					}
					size = b3 + 1;
				}
				else
				{
					size = num2 + 1;
				}
				return SetLength(array, size);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxfpr, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxfpr);
				}
			}
		}

		internal static byte[] lnxflo(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxflo);
			}
			try
			{
				byte[] array = lnxtru(n, 0);
				if (compareBytes(array, n) != 0 && !IsPositive(n))
				{
					array = lnxsub(array, lnxqone);
				}
				return array;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxflo, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxflo);
				}
			}
		}

		internal static byte[] lnxrou(byte[] n, int decimal_place)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxrou);
			}
			try
			{
				int num = n.Length;
				byte b = 0;
				switch (num)
				{
				case 1:
					if (n[b] == 128)
					{
						return GetZeroByteRep();
					}
					return GetNegativeInfinityByteRep();
				case 2:
					if (n[0] == byte.MaxValue && n[1] == (byte)(LNXBASE + 1))
					{
						return GetPositiveInfinityByteRep();
					}
					break;
				}
				int num2 = ((n[0] < 0) ? (256 + n[0]) : n[0]);
				bool flag;
				int num3;
				bool flag2;
				byte b2;
				byte b3;
				sbyte b4;
				if (flag = IsPositive(n))
				{
					if (decimal_place >= 0)
					{
						num3 = num2 + (decimal_place + 1 >> 1) - 192;
						flag2 = ((((uint)decimal_place & (true ? 1u : 0u)) != 0) ? true : false);
					}
					else
					{
						decimal_place = -decimal_place;
						num3 = num2 - (decimal_place >> 1) - 192;
						flag2 = ((((uint)decimal_place & (true ? 1u : 0u)) != 0) ? true : false);
					}
					b2 = 1;
					b3 = (byte)LNXBASE;
					b4 = 1;
				}
				else
				{
					if (decimal_place >= 0)
					{
						num3 = 63 + (decimal_place + 1 >> 1) - num2;
						flag2 = ((((uint)decimal_place & (true ? 1u : 0u)) != 0) ? true : false);
					}
					else
					{
						decimal_place = -decimal_place;
						num3 = 63 - (decimal_place >> 1) - num2;
						flag2 = ((((uint)decimal_place & (true ? 1u : 0u)) != 0) ? true : false);
					}
					b2 = (byte)(LNXBASE + 1);
					b3 = 2;
					b4 = -1;
					num -= ((n[num - 1] == LNXBASE + 2) ? 1 : 0);
				}
				byte[] array = new byte[num];
				Array.Copy(n, 0, array, 0, num);
				if (num3 > num - 1 || (num3 == num - 1 && (!flag2 || LnxqFirstDigit[n[num3]] == 1)))
				{
					return SetLength(n, num);
				}
				if (num3 < 0 || (num3 == 0 && (flag2 || (flag ? (n[1] < 51) : (n[1] > 51)))) || (num3 == 1 && flag2 && (flag ? (n[1] < 6) : (n[1] > 96))))
				{
					return GetZeroByteRep();
				}
				if (num3 == 0)
				{
					if (flag ? (n[b] == byte.MaxValue) : (n[b] == 0))
					{
						if (flag)
						{
							return GetPositiveInfinityByteRep();
						}
						return GetNegativeInfinityByteRep();
					}
					array[0] = (byte)(n[b] + b4);
					array[1] = (byte)(b2 + b4);
					return SetLength(array, 2);
				}
				byte b5;
				byte b6 = (b5 = (byte)num3);
				if (flag2)
				{
					array[b5] = (flag ? LnxqRound_P[n[b6]] : LnxqRound_N[n[b6]]);
				}
				else if (flag ? (n[b6 + 1] > 50) : (n[b6 + 1] < 52))
				{
					array[b5] = (byte)(n[b6] + b4);
				}
				else
				{
					array[b5] = n[b6];
				}
				b6 = (byte)(b6 - 1);
				int size;
				if (array[b5] == b3 + b4)
				{
					while (b6 > b && n[b6] == b3)
					{
						b6 = (byte)(b6 - 1);
					}
					if (b6 == b)
					{
						if (flag ? (n[b] == byte.MaxValue) : (n[b] == 0))
						{
							if (flag)
							{
								return GetPositiveInfinityByteRep();
							}
							return GetNegativeInfinityByteRep();
						}
						array[0] = (byte)(n[b] + b4);
						array[1] = (byte)(b2 + b4);
						return SetLength(array, 2);
					}
					array[b6 - b] = (byte)(n[b6] + b4);
					size = b6 - b + 1;
					b6 = (byte)(b6 - 1);
				}
				else if (array[b5] == b2)
				{
					while (n[b6] == b2)
					{
						b6 = (byte)(b6 - 1);
					}
					size = b6 - b + 1;
				}
				else
				{
					size = num3 + 1;
				}
				return SetLength(array, size);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxrou, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxrou);
				}
			}
		}

		internal static byte[] lnxtru(byte[] n, int decimal_place)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxtru);
			}
			try
			{
				int num = n.Length;
				if (IsZero(n))
				{
					return GetZeroByteRep();
				}
				if (IsNegativeInfinity(n))
				{
					return GetNegativeInfinityByteRep();
				}
				if (IsPositiveInfinity(n))
				{
					return GetPositiveInfinityByteRep();
				}
				int num2 = ((n[0] < 0) ? (256 + n[0]) : n[0]);
				bool flag;
				int num3;
				bool flag2;
				byte b;
				if (flag = IsPositive(n))
				{
					if (decimal_place >= 0)
					{
						num3 = num2 + (decimal_place + 1 >> 1) - 192;
						flag2 = (((decimal_place & 1) == 1) ? true : false);
					}
					else
					{
						decimal_place = -decimal_place;
						num3 = num2 - (decimal_place >> 1) - 192;
						flag2 = (((decimal_place & 1) == 1) ? true : false);
					}
					b = 1;
				}
				else
				{
					if (decimal_place >= 0)
					{
						num3 = 63 + (decimal_place + 1 >> 1) - num2;
						flag2 = (((decimal_place & 1) == 1) ? true : false);
					}
					else
					{
						decimal_place = -decimal_place;
						num3 = 63 - (decimal_place >> 1) - num2;
						flag2 = (((decimal_place & 1) == 1) ? true : false);
					}
					b = (byte)(LNXBASE + 1);
					if (n[num - 1] == LNXBASE + 2)
					{
						num--;
					}
				}
				byte[] array = new byte[num];
				Array.Copy(n, 0, array, 0, num);
				if (num3 > num - 1 || (num3 == num - 1 && flag2 && LnxqFirstDigit[n[num3]] == 1))
				{
					return SetLength(n, num);
				}
				if (num3 <= 0 || (num3 == 1 && flag2 && (flag ? (n[1] < 11) : (n[1] > 91))))
				{
					return GetZeroByteRep();
				}
				byte b2;
				byte b3 = (b2 = (byte)num3);
				if (flag2)
				{
					if (flag)
					{
						array[b3] = LnxqTruncate_P[n[b2]];
					}
					else
					{
						array[b3] = LnxqTruncate_N[n[b2]];
					}
				}
				else
				{
					array[b3] = n[b2];
				}
				b2 = (byte)(b2 - 1);
				int size;
				if (array[b3] == b)
				{
					while (n[b2] == b)
					{
						b2 = (byte)(b2 - 1);
					}
					size = b2 + 1;
				}
				else
				{
					size = num3 + 1;
				}
				return SetLength(array, size);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxtru, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxtru);
				}
			}
		}

		internal static byte[] lnxpow(byte[] n, int power)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxpow);
			}
			try
			{
				byte[] array;
				if (power >= 0)
				{
					array = new byte[n.Length];
					Array.Copy(n, 0, array, 0, n.Length);
				}
				else
				{
					int num = int.MinValue;
					if (power == num)
					{
						array = lnxpow(n, num + 1);
						return lnxdiv(array, n);
					}
					power = -power;
					array = lnxdiv(lnxqone, n);
				}
				byte[] array2 = lnxqone;
				while (power > 0)
				{
					if ((power & 1) == 1)
					{
						array2 = lnxmul(array2, array);
					}
					if ((power >>= 1) > 0)
					{
						array = lnxmul(array, array);
					}
				}
				return array2;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxpow, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxpow);
				}
			}
		}

		internal static byte[] lnxbex(byte[] b, byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxbex);
			}
			try
			{
				switch (lnxsgn(b))
				{
				case 1:
				{
					byte[] n2 = lnxln(b);
					n2 = lnxmul(n, n2);
					return lnxexp(n2);
				}
				case 0:
					if (IsZero(n))
					{
						byte[] n2 = new byte[lnxqone.Length];
						Array.Copy(lnxqone, 0, n2, 0, lnxqone.Length);
						return n2;
					}
					return GetZeroByteRep();
				case -1:
					if (IsInt(n))
					{
						byte[] n2 = lnxneg(b);
						n2 = lnxln(n2);
						n2 = lnxmul(n, n2);
						n2 = lnxexp(n2);
						if (!IsZero(lnxmod(n, lnxqtwo)))
						{
							n2 = lnxneg(n2);
						}
						return n2;
					}
					return GetPositiveInfinityByteRep();
				default:
					return null;
				}
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxbex, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxbex);
				}
			}
		}

		internal static byte[] lnxln(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxln);
			}
			try
			{
				if (lnxsgn(n) <= 0)
				{
					return GetNegativeInfinityByteRep();
				}
				if (IsPositiveInfinity(n))
				{
					return GetPositiveInfinityByteRep();
				}
				byte[] array = new byte[n.Length];
				Array.Copy(n, 0, array, 0, n.Length);
				int num = (array[0] & 0xFF) - 193;
				array[0] = 193;
				byte[] byteRep = GetByteRep(Math.Log(lnxnur(array)));
				byte[] n2 = lnxexp(byteRep);
				byte[] n3 = lnxdiv(array, n2);
				n3 = lnxsub(n3, lnxqone);
				byte[] array2 = new byte[n3.Length];
				Array.Copy(n3, 0, array2, 0, n3.Length);
				byte[] array3 = lnxmul(n3, n3);
				int num2 = 1;
				while ((array3[0] & 0xFF) > 172)
				{
					num2++;
					n2 = lnxqIDiv(array3, num2);
					array2 = lnxsub(array2, n2);
					array3 = lnxmul(n3, array3);
					num2++;
					n2 = lnxqIDiv(array3, num2);
					array2 = lnxadd(array2, n2);
					array3 = lnxmul(n3, array3);
				}
				num *= 2;
				byte[] lN = LN10;
				n3 = lnxmin(num);
				n2 = lnxmul(n3, lN);
				n2 = lnxadd(n2, byteRep);
				return lnxadd(n2, array2);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxln, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxln);
				}
			}
		}

		internal static byte[] lnxlog(byte[] n, byte[] b)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxlog);
			}
			try
			{
				double num = lnxnur(b);
				if (num > 0.0)
				{
					if (num == 10.0)
					{
						byte[] n2 = lnxln(n);
						byte[] lN = LN10;
						return lnxdiv(n2, lN);
					}
					byte[] n3 = lnxln(n);
					byte[] n4 = lnxln(b);
					return lnxdiv(n3, n4);
				}
				return GetNegativeInfinityByteRep();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxlog, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxlog);
				}
			}
		}

		internal static byte[] lnxexp(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxexp);
			}
			try
			{
				return lnxqtra(n, 9);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxexp, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxexp);
				}
			}
		}

		internal static byte[] lnxsin(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsin);
			}
			try
			{
				return lnxqtra(n, 4);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsin, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsin);
				}
			}
		}

		internal static byte[] lnxsnh(byte[] n)
		{
			return lnxqtra(n, 7);
		}

		internal static byte[] lnxasin(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxasin);
			}
			try
			{
				return lnxqtri(n, 1);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxasin, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxasin);
				}
			}
		}

		internal static byte[] lnxcos(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxcos);
			}
			try
			{
				return lnxqtra(n, 3);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxcos, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxcos);
				}
			}
		}

		internal static byte[] lnxcsh(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxcsh);
			}
			try
			{
				return lnxqtra(n, 6);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxcsh, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxcsh);
				}
			}
		}

		internal static byte[] lnxacos(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxacos);
			}
			try
			{
				return lnxqtri(n, 0);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxacos, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxacos);
				}
			}
		}

		internal static byte[] lnxtan(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxtan);
			}
			try
			{
				return lnxqtra(n, 5);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxtan, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxtan);
				}
			}
		}

		internal static byte[] lnxatan(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxatan);
			}
			try
			{
				return lnxqtri(n, 2);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxatan, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxatan);
				}
			}
		}

		internal static byte[] lnxatan2(byte[] y, byte[] x)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxatan2);
			}
			try
			{
				if (IsZero(y) && IsZero(x))
				{
					throw new ArgumentException();
				}
				byte[] n = lnxdiv(y, x);
				n = lnxatan(n);
				if (IsPositive(x))
				{
					return n;
				}
				byte[] pI = PI;
				if (IsPositive(y))
				{
					return lnxadd(n, pI);
				}
				return lnxsub(n, pI);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxatan2, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxatan2);
				}
			}
		}

		internal static byte[] lnxtnh(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxtnh);
			}
			try
			{
				return lnxqtra(n, 8);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxtnh, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxtnh);
				}
			}
		}

		private static int LnxmulSetSum(int[] ptr1, int[] ptr2, int index1, int index2, int element, int sum)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.LnxmulSetSum);
			}
			try
			{
				int num = 0;
				try
				{
					return sum + ptr1[index1 - element] * ptr2[index2 + element];
				}
				catch (IndexOutOfRangeException)
				{
					throw new IndexOutOfRangeException("INVALIDORLN");
				}
			}
			catch (Exception ex2)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.LnxmulSetSum, ex2);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.LnxmulSetSum);
				}
			}
		}

		private static int LnxmulSetDigit1(byte[] rslBuf, int index, int sum)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.LnxmulSetDigit1);
			}
			try
			{
				int num = sum / LNXBASE;
				int num2 = sum / (LNXBASE * LNXBASE);
				index -= 2;
				rslBuf[index + 1] = (byte)(sum - num * LNXBASE + 1);
				rslBuf[index] = (byte)(num - num2 * LNXBASE + 1);
				return num2;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.LnxmulSetDigit1, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.LnxmulSetDigit1);
				}
			}
		}

		private static void LnxmulSetDigit2(byte[] rslBuf, int index, int sum)
		{
			int num = sum / LNXBASE;
			index -= 2;
			rslBuf[index] = (byte)(num + 1);
			rslBuf[index + 1] = (byte)(sum - num * LNXBASE + 1);
		}

		internal static int compareBytes(byte[] abyte0, byte[] abyte1)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.compareBytes);
			}
			try
			{
				int num = abyte0.Length;
				int num2 = abyte1.Length;
				int i = 0;
				for (int num3 = Math.Min(num, num2); i < num3; i++)
				{
					int num4 = abyte0[i] & 0xFF;
					int num5 = abyte1[i] & 0xFF;
					if (num4 != num5)
					{
						return (num4 >= num5) ? 1 : (-1);
					}
				}
				if (num == num2)
				{
					return 0;
				}
				return (num > num2) ? 1 : (-1);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.compareBytes, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.compareBytes);
				}
			}
		}

		private static int lnxcmp(byte[] n1, byte[] n2)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxcmp);
			}
			try
			{
				return compareBytes(n1, n2);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxcmp, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxcmp);
				}
			}
		}

		private static int lnxsgn(byte[] n)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsgn);
			}
			try
			{
				if (IsZero(n))
				{
					return 0;
				}
				if (IsPositive(n))
				{
					return 1;
				}
				return -1;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsgn, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxsgn);
				}
			}
		}

		private static byte[] lnxqIDiv(byte[] y, int x)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxqIDiv);
			}
			try
			{
				byte[] n = lnxmin(x);
				return lnxdiv(y, n);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxqIDiv, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxqIDiv);
				}
			}
		}

		private static byte[] lnxqtra(byte[] n, int funcid)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxqtra);
			}
			try
			{
				byte[] array = null;
				byte[] array2 = null;
				byte[] array3 = null;
				byte[] pI = PI;
				byte[] array4 = lnxmin(-1L);
				long num = 0L;
				switch (funcid)
				{
				case 3:
				case 4:
				case 5:
					array3 = lnxmul(lnxqtwo, pI);
					array = lnxabs(n);
					array = lnxmod(array, array3);
					if (lnxcmp(array, pI) > 0)
					{
						array = lnxsub(array, array3);
					}
					if (lnxsgn(n) == -1)
					{
						array = lnxneg(array);
					}
					array2 = lnxmul(array, array);
					break;
				case 9:
					array = lnxmod(n, lnxqone);
					array3 = lnxsub(n, array);
					if ((array3[0] & 0xFF) < 60)
					{
						return GetZeroByteRep();
					}
					if ((array3[0] & 0xFF) > 195)
					{
						return GetPositiveInfinityByteRep();
					}
					num = lnxsni(array3);
					array2 = lnxmul(array, array);
					break;
				default:
					array = new byte[n.Length];
					Array.Copy(n, 0, array, 0, n.Length);
					array2 = lnxmul(array, array);
					break;
				}
				byte[] array5 = null;
				byte[] array6 = null;
				if (funcid != 4 && funcid != 7)
				{
					array3 = lnxqone;
					array5 = lnxqone;
					array6 = GetZeroByteRep();
					int num2 = 0;
					do
					{
						array3 = lnxmul(array2, array3);
						int x = (num2 + 1) * (num2 + 2);
						num2 += 2;
						array3 = lnxqIDiv(array3, x);
						array6 = lnxadd(array6, array3);
						array3 = lnxmul(array2, array3);
						x = (num2 + 1) * (num2 + 2);
						num2 += 2;
						array3 = lnxqIDiv(array3, x);
						array5 = lnxadd(array5, array3);
					}
					while ((array3[0] & 0xFF) + 20 >= (array5[0] & 0xFF) && (array6[0] & 0xFF) != 255);
				}
				byte[] array7 = null;
				byte[] array8 = null;
				if (funcid != 3 && funcid != 6)
				{
					array3 = new byte[array.Length];
					Array.Copy(array, 0, array3, 0, array.Length);
					array7 = new byte[array.Length];
					Array.Copy(array, 0, array7, 0, array.Length);
					array8 = GetZeroByteRep();
					int num3 = 1;
					do
					{
						array3 = lnxmul(array2, array3);
						int x = (num3 + 1) * (num3 + 2);
						num3 += 2;
						array3 = lnxqIDiv(array3, x);
						array8 = lnxadd(array8, array3);
						array3 = lnxmul(array2, array3);
						x = (num3 + 1) * (num3 + 2);
						num3 += 2;
						array3 = lnxqIDiv(array3, x);
						array7 = lnxadd(array7, array3);
					}
					while (((array3[0] & 0xFF) != 128 || array3.Length != 1) && ((array3[0] & 0xFF) < 128 || (array3[0] & 0xFF) + 20 >= (array7[0] & 0xFF)) && ((array3[0] & 0xFF) >= 128 || (array3[0] & 0xFF) <= (array7[0] & 0xFF) + 20) && (array8[0] & 0xFF) != 255 && (array8[0] & 0xFFu) != 0);
				}
				byte[] array9 = null;
				byte[] array10 = null;
				switch (funcid)
				{
				case 3:
				case 4:
				case 5:
					if (funcid == 3 || funcid == 5)
					{
						array9 = lnxsub(array5, array6);
						if (lnxcmp(array9, lnxqone) > 0)
						{
							array9 = lnxqone;
						}
						else if (lnxcmp(array9, array4) < 0)
						{
							array9 = array4;
						}
					}
					if (funcid == 3)
					{
						return array9;
					}
					array10 = lnxsub(array7, array8);
					if (lnxcmp(array10, lnxqone) > 0)
					{
						array10 = lnxqone;
					}
					else if (lnxcmp(array10, array4) < 0)
					{
						array10 = array4;
					}
					if (funcid == 4)
					{
						return array10;
					}
					return lnxdiv(array10, array9);
				case 6:
					return lnxadd(array5, array6);
				case 7:
					return lnxadd(array7, array8);
				default:
				{
					array10 = lnxadd(array7, array8);
					array9 = lnxadd(array5, array6);
					if (funcid == 8)
					{
						return lnxdiv(array10, array9);
					}
					byte[] e = E;
					byte[] n2 = lnxadd(array9, array10);
					array = lnxpow(e, (int)num);
					return lnxmul(n2, array);
				}
				}
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxqtra, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxqtra);
				}
			}
		}

		private static byte[] lnxqtri(byte[] n, int funcid)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxqtri);
			}
			try
			{
				byte[] array = null;
				byte[] array2 = null;
				byte[] pI = PI;
				byte[] array3 = lnxdiv(pI, lnxqtwo);
				if (funcid == 2)
				{
					if (IsPositiveInfinity(n))
					{
						return array3;
					}
					if (IsNegativeInfinity(n))
					{
						return lnxneg(array3);
					}
				}
				byte[] array4 = lnxabs(n);
				if (funcid == 1 || funcid == 0)
				{
					if (lnxcmp(array4, lnxqone) > 0)
					{
						throw new ArgumentException("INVALIDINPUTN");
					}
					if ((array4[0] & 0xFF) <= 183)
					{
						if (funcid == 1)
						{
							byte[] array5 = new byte[n.Length];
							Array.Copy(n, 0, array5, 0, n.Length);
							return array5;
						}
						return lnxsub(array3, n);
					}
					array = lnxsub(lnxqone, array4);
					array2 = lnxadd(lnxqone, array4);
					array4 = lnxdiv(array, array2);
					array4 = lnxsqr(array4);
				}
				int num;
				if ((num = lnxcmp(array4, lnxqone)) > 0)
				{
					array4 = lnxdiv(lnxqone, array4);
				}
				array = new byte[array4.Length];
				Array.Copy(array4, 0, array, 0, array4.Length);
				int num2 = 1;
				while (true)
				{
					array2 = lnxtan(array);
					byte[] n2 = lnxsub(array4, array2);
					array2 = lnxmul(array2, array2);
					array2 = lnxadd(array2, lnxqone);
					array2 = lnxdiv(n2, array2);
					int num3 = (((array2[0] & 0xFF) >= 128) ? ((array2[0] & 0xFF) - 193) : (62 - (array2[0] & 0xFF)));
					int num4 = (((array[0] & 0xFF) >= 128) ? ((array[0] & 0xFF) - 193) : (62 - (array[0] & 0xFF)));
					if (((array2[0] & 0xFF) == 128 && array2.Length == 1) || (num3 & 0xFF) + 15 < (num4 & 0xFF) || num2 > 15)
					{
						break;
					}
					array = lnxadd(array, array2);
					num2++;
				}
				if (num > 0)
				{
					array = lnxsub(array3, array);
				}
				if ((array[0] & 0xFF) < 128)
				{
					array = GetZeroByteRep();
				}
				if (lnxcmp(array, array3) > 0)
				{
					array = array3;
				}
				if (funcid == 1 || funcid == 0)
				{
					array = lnxmul(array, lnxqtwo);
				}
				switch (funcid)
				{
				case 1:
					if (IsPositive(n))
					{
						return lnxsub(array3, array);
					}
					return lnxsub(array, array3);
				case 0:
					if (IsPositive(n))
					{
						return array;
					}
					return lnxsub(pI, array);
				case 2:
					if (IsPositive(n))
					{
						return array;
					}
					return lnxneg(array);
				default:
					throw new ArgumentException("INVALIDINPUTN");
				}
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxqtri, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleNumberCore, OracleTraceFuncName.lnxqtri);
				}
			}
		}
	}
}
